ModelBuilder.UnitTests.ObjectExtensionTests.FindPropertiesReturnsPropertyMatchTest C# (CSharp) Method

FindPropertiesReturnsPropertyMatchTest() private method

private FindPropertiesReturnsPropertyMatchTest ( Type type, string expression, bool shouldExist ) : void
type System.Type
expression string
shouldExist bool
return void
        public void FindPropertiesReturnsPropertyMatchTest(Type type, string expression, bool shouldExist)
        {
            var regex = new Regex(expression);

            var target = Activator.CreateInstance(type);

            var actual = target.FindProperties(regex);

            if (shouldExist)
            {
                actual.Should().NotBeEmpty();
            }
            else
            {
                actual.Should().BeEmpty();
            }
        }