コード例 #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);
        }