예제 #1
0
        public void EmptyPatternMatchTest()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("");

            Assert.IsTrue(stringMatcher.MatchTo("1"));
            Assert.IsTrue(stringMatcher.MatchTo(" "));
            Assert.IsTrue(stringMatcher.MatchTo("test"));
        }
예제 #2
0
        public void EmptyTextMatchTest()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("1");

            Assert.IsFalse(stringMatcher.MatchTo(""));
            stringMatcher = CreateStringMatcher(" ");
            Assert.IsFalse(stringMatcher.MatchTo(""));
            stringMatcher = CreateStringMatcher("test");
            Assert.IsFalse(stringMatcher.MatchTo(""));
        }
예제 #3
0
        public void MatchTest5()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("y");

            Assert.IsFalse(stringMatcher.MatchTo("other input string"));
        }
예제 #4
0
        public void MatchTest4()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("ncet");

            Assert.IsFalse(stringMatcher.MatchTo("some sentence"));
        }
예제 #5
0
        public void MatchTest2()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("ent");

            Assert.IsTrue(stringMatcher.MatchTo("some sentence"));
        }
예제 #6
0
        public void MatchTwoEmptyStringsTest()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("");

            Assert.IsTrue(stringMatcher.MatchTo(""));
        }
예제 #7
0
        public void MatchGuardCase1Test()
        {
            IStringMatcher stringMatcher = CreateStringMatcher("1");

            stringMatcher.MatchTo(null);
        }