public void MatchListMultipleInSentence() { var sentence = "This [pronounce: <IPA>]has[endpronounce] multiple[pause: 2][pronounce: <IPA>]matches.[endpronounce]"; var matches = new PronounceTagMatcher().Matches(sentence); Assert.IsTrue(matches.Any(), "No matches found."); Assert.IsTrue(matches.Count == 2, "Didn't match all."); }
public void MatchListMultipleInSentence() { string sentence = "This [pronounce: <IPA>]has[endpronounce] multiple[pause: 2][pronounce: <IPA>]matches.[endpronounce]"; System.Collections.Generic.List <PowerPointLabs.Tags.ITag> matches = new PronounceTagMatcher().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 a [pronounce: <IPA>]test[endpronounce]."; var matches = new PronounceTagMatcher().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 == 10, "Match start was incorrect."); Assert.IsTrue(match.End == 45, "Match end was incorrect."); }
public void MatchListSingleInSentence() { string sentence = "This is a [pronounce: <IPA>]test[endpronounce]."; System.Collections.Generic.List <PowerPointLabs.Tags.ITag> matches = new PronounceTagMatcher().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 == 10, "Match start was incorrect."); Assert.IsTrue(match.End == 45, "Match end was incorrect."); }