public void FilterContentTest() { string content = "The horrible tea tasted horrible."; string[] negativeWords = new string[] { "horrible", "bad" }; IContentAnalyser contentAnalyser = new ContentAnalyser(content, negativeWords); Assert.AreEqual("The h######e tea tasted h######e.", contentAnalyser.FilterContent()); }
public void WriteFilteredContent() { IRepository repository = new FileRepository(); IContentAnalyser contentAnalyser = new ContentAnalyser(repository.GetContent(), repository.GetNegativeWords()); var filteredContent = contentAnalyser.FilterContent(); Console.WriteLine(filteredContent); Console.WriteLine("Press ANY key to exit."); Console.ReadKey(); }