public void Lese_StopwordsDatei_Erwarte_Zeilen() { StopwordsProvider stopwordsProvider = new StopwordsProvider(); List <string> result = stopwordsProvider.Read_Stopwords(); Assert.That(result, Is.Not.Null); Assert.That(result.Count, Is.EqualTo(4)); }
public void Lese_LeereDatei_Erwarte_Null() { string pathZuStopwords = $"{AppDomain.CurrentDomain.BaseDirectory}\\App_Data\\leer.txt"; StopwordsProvider stopwordsProvider = new StopwordsProvider(pathZuStopwords); List <string> result = stopwordsProvider.Read_Stopwords(); Assert.That(result, Is.Not.Null); Assert.That(result.Count, Is.EqualTo(0)); }
public int Count_Words(string text) { List <string> words = _words.Split_into_Words(text); List <string> stopwords = _stopwordsProvider.Read_Stopwords(); List <string> gefilterteWords = _words.Filter_Stopwords(words, stopwords); int result = _words.Count(gefilterteWords); return(result); }