Exemplo n.º 1
0
        public void MultipleTagsTest(string text, params string[] tags)
        {
            var listOfWords = InitializeListWithWords(text);

            var test = new CompareTextUsingCosineTestClass(listOfWords, tags);

            CollectionAssert.AreEqual(tags, test.Tags);
        }
Exemplo n.º 2
0
        public void TextToBeComparedTest(string text, int expectedResult, params string[] tags)
        {
            var listOfWords = InitializeListWithWords(text);

            var test = new CompareTextUsingCosineTestClass(listOfWords, tags);

            Assert.AreEqual(test.TextToBeCompared.Count(), expectedResult);
        }
Exemplo n.º 3
0
        public void FullImplementationFalseArticleSimilarity(string fileName, string tag, string trueOrFalse, int expectedResult,
                                                             params string[] tags)
        {
            string path = GetFilePath(fileName, tag, trueOrFalse);

            var text = new LoadEachWordToList(path);

            var test = new CompareTextUsingCosineTestClass(text.Words, tags);

            Assert.AreEqual(expectedResult, test.FalseArticlesSimilarity);
        }