ModelBuilder.UnitTests.CreationRuleTests.IsMatchReturnsWhetherTypeAndRegularExpressionMatchTest C# (CSharp) Method

IsMatchReturnsWhetherTypeAndRegularExpressionMatchTest() private method

private IsMatchReturnsWhetherTypeAndRegularExpressionMatchTest ( Type type, string expression, Type matchType, string matchName, bool expected ) : void
type System.Type
expression string
matchType System.Type
matchName string
expected bool
return void
        public void IsMatchReturnsWhetherTypeAndRegularExpressionMatchTest(
            Type type,
            string expression,
            Type matchType,
            string matchName,
            bool expected)
        {
            var priority = Environment.TickCount;
            var regex = new Regex(expression);

            var target = new CreationRule(type, regex, priority, (object)null);

            var actual = target.IsMatch(matchType, matchName);

            actual.Should().Be(expected);
        }