Ejemplo n.º 1
0
        public void TestEmpty()
        {
            var patterns = new List <Pair <StringPatternSet, Boolean> >();

            Assert.IsTrue(StringPatternSetUtil.Evaluate(true, patterns, "abc"));
            Assert.IsFalse(StringPatternSetUtil.Evaluate(false, patterns, "abc"));
        }
Ejemplo n.º 2
0
 private void RunAssertion(IEnumerable <Pair <StringPatternSet, bool> > patterns)
 {
     Assert.IsTrue(StringPatternSetUtil.Evaluate(false, patterns, "123"));
     Assert.IsFalse(StringPatternSetUtil.Evaluate(false, patterns, "123abc"));
     Assert.IsTrue(StringPatternSetUtil.Evaluate(false, patterns, "123abcdef"));
     Assert.IsFalse(StringPatternSetUtil.Evaluate(false, patterns, "123abcdefxyz"));
     Assert.IsFalse(StringPatternSetUtil.Evaluate(false, patterns, "456"));
     Assert.IsTrue(StringPatternSetUtil.Evaluate(true, patterns, "456"));
 }