Ejemplo n.º 1
0
        public void CreateStringWithNoMatchingCharactersSecond()
        {
            var message    = "hruth is nowhere because it is miss spelled";
            var wordToFind = "truth";

            var bmhp   = new BoyerMooreHorspool(message);
            var result = bmhp.Found(wordToFind);

            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void CreateStringWithMatchingCharactersAtEnd()
        {
            var message    = "we have found the truth";
            var wordToFind = "truth";

            var bmhp   = new BoyerMooreHorspool(message);
            var result = bmhp.Found(wordToFind);

            Assert.IsTrue(result);
        }
Ejemplo n.º 3
0
        public void CreateStringWithMatchingCharactersAtStart()
        {
            var message    = "truth is everywhere";
            var wordToFind = "truth";

            var bmhp   = new BoyerMooreHorspool(message);
            var result = bmhp.Found(wordToFind);

            Assert.IsTrue(result);
        }