Exemple #1
0
        public void MatchListMultipleInSentence()
        {
            var sentence = "This [speed: slow]has multiple[endspeed][speed: fast] matches.[endspeed]";
            var matches  = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 2, "Didn't match all.");
        }
        public void MatchListMultipleInSentence()
        {
            var sentence = "This [speed: slow]has multiple[endspeed][speed: fast] matches.[endspeed]";
            var matches = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 2, "Didn't match all.");
        }
Exemple #3
0
        public void MatchListMultipleInSentence()
        {
            string sentence = "This [speed: slow]has multiple[endspeed][speed: fast] matches.[endspeed]";

            System.Collections.Generic.List <PowerPointLabs.Tags.ITag> matches = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 2, "Didn't match all.");
        }
        public void MatchListSingleInSentence()
        {
            var sentence = "This is [speed: fast]a test[endspeed].";
            var matches = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 1, "More than one match.");

            var match = matches[0];
            Assert.IsTrue(match.Start == 27, "Match start was incorrect.");
            Assert.IsTrue(match.End == 36, "Match end was incorrect.");
        }
Exemple #5
0
        public void MatchListSingleInSentence()
        {
            var sentence = "This is [speed: fast]a test[endspeed].";
            var matches  = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 1, "More than one match.");

            var match = matches[0];

            Assert.IsTrue(match.Start == 27, "Match start was incorrect.");
            Assert.IsTrue(match.End == 36, "Match end was incorrect.");
        }
Exemple #6
0
        public void MatchListSingleInSentence()
        {
            string sentence = "This is [speed: fast]a test[endspeed].";

            System.Collections.Generic.List <PowerPointLabs.Tags.ITag> matches = new EndSpeedTagMatcher().Matches(sentence);

            Assert.IsTrue(matches.Any(), "No matches found.");
            Assert.IsTrue(matches.Count == 1, "More than one match.");

            PowerPointLabs.Tags.ITag match = matches[0];
            Assert.IsTrue(match.Start == 27, "Match start was incorrect.");
            Assert.IsTrue(match.End == 36, "Match end was incorrect.");
        }