Пример #1
0
        public void findMatch_empty()
        {
            int          FromIndex = 0;
            string       text = "", subtext = "";
            TextMatching tm = new TextMatching();

            tm.FindMatch(FromIndex, text, subtext);
        }
Пример #2
0
        public void findMatch_ValidValues_lastIndex()
        {
            int          FromIndex = 0;
            string       text = "Polly put the kettle on, polly put the kettle on, polly put the kettle on we'll all have tea z", subtext = "z";
            int          expectedValue = 94;
            TextMatching tm            = new TextMatching();
            int          actualValue   = tm.FindMatch(FromIndex, text, subtext);

            Assert.AreEqual(expectedValue, actualValue);
        }