public void SplitTextAndCount_TextWithTwoIdenticalWords_WordsDictionaryWithOneWords(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, null, null, true); int length = dics.WordsDictionary.Count; Assert.AreEqual(length, 1); }
public void SplitTextAndCount_TextWithTwoDifferentWords_WordsDictionaryWithTwoWordsAndOneOccurences(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, null, null, true); int length = dics.WordsDictionary.Count; Assert.AreEqual(length, 2); }
public void SplitTextAndCount_EmptyText_WordsDictionaryEmpty(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, null, null, true); int length = dics.WordsDictionary.Count; Assert.AreEqual(length, 0); }
public void SplitTextAndCount_TextWithTwoIdenticalWords_WordsDictionaryWithOneWordsAndTwoOccurences(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, null, null, true); int occurences = dics.WordsDictionary["abc"]; Assert.AreEqual(occurences, 2); }
public void SplitTextAndCount_TextWithTwoDifferentWordsAndOneInStopwords_WordsDictionaryWithOneWord(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); dics.StopWordsDictionary.Add("abc", 0); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, dics.StopWordsDictionary, null, true); int length = dics.WordsDictionary.Count; Assert.AreEqual(length, 1); }
public void SplitTextAndCount_TextWithTwoWordsAndOneInDicAndCanCountOnlyExistsInDic_WordInDicOccurencesIsTwo(string text) { CreatedEmptyWordsKeywordsStopwordsDic dics = new CreatedEmptyWordsKeywordsStopwordsDic(); dics.WordsDictionary.Add("abc", 1); WordCounter.SplitTextAndCount(text, dics.WordsDictionary, null, null, false); int occurences = dics.WordsDictionary["abc"]; Assert.AreEqual(occurences, 2); }