public void TextToBeComparedTest(string text, int expectedResult, params string[] tags) { var listOfWords = InitializeListWithWords(text); var test = new CompareTextUsingJaccardTestClass(listOfWords, tags); Assert.AreEqual(test.TextToBeCompared.Count(), expectedResult); }
public void MultipleTagsTest(string text, params string[] tags) { var listOfWords = InitializeListWithWords(text); var test = new CompareTextUsingJaccardTestClass(listOfWords, tags); CollectionAssert.AreEqual(tags, test.Tags); }
public void FullImplementationTrueArticleSimilarity(string fileName, string tag, string trueOrFalse, decimal expectedResult, params string[] tags) { string path = GetFilePath(fileName, tag, trueOrFalse); var text = new LoadEachWordToList(path); var test = new CompareTextUsingJaccardTestClass(text.Words, tags); decimal result = Math.Round(test.TrueArticlesSimilarity, 5); Assert.AreEqual(expectedResult, result); }