示例#1
0
        public void Does_Not_Match_Name_That_Does_Not_Match_Regex()
        {
            var rule       = new NamedObjectFilterRule(FilterOperation.Ignore, "^[0-9][a-zA-Z][a-zA-Z][a-zA-Z]", MatchType.DoesMatch);
            var objectName = new ObjectIdentifier("WOWSES9898989Tab");

            var result = rule.Matches(objectName, null);

            Assert.IsFalse(result);
        }
示例#2
0
        public void Does_Match_Name_That_Does_Not_Match_Regex_But_Is_A_Negative_Match_Type()
        {
            var rule       = new NamedObjectFilterRule(FilterOperation.Ignore, ".*blah.*", MatchType.DoesNotMatch);
            var objectName = new ObjectIdentifier("WOWSES9898989Tab");

            var result = rule.Matches(objectName, null);

            Assert.IsTrue(result);
        }
示例#3
0
        public void Matches_Name_That_Matches_Regex()
        {
            var rule       = new NamedObjectFilterRule(FilterOperation.Ignore, "[a-zA-Z][a-zA-Z][a-zA-Z]", MatchType.DoesMatch);
            var objectName = new ObjectIdentifier("Tab");

            var result = rule.Matches(objectName, null);

            Assert.IsTrue(result);
        }