public void ContainsAnyWord_No() { MaskWordFilter = new MaskWordFilter(new StringWordSource("f**k|shit")); var disharmonyStr = "Go frack yourself and eat some shirt!"; var b = MaskWordFilter.ContainsAnyWord(disharmonyStr); Assert.IsFalse(b); }
public void HarmonizeWords_MessedUpSource() { MaskWordFilter = new MaskWordFilter(new StringWordSource("f**k|shit|")); var disharmonyStr = "Go f**k yourself and eat some shit!"; var harmonyStr = MaskWordFilter.FilterContent(disharmonyStr); Assert.AreEqual("Go **** yourself and eat some ****!", harmonyStr); }
public LocalWordFilterModerator(IBlogConfig blogConfig) { var sw = new StringWordSource(blogConfig.ContentSettings.DisharmonyWords); _filter = new MaskWordFilter(sw); }
public void Setup() { MaskWordFilter = new MaskWordFilter(new StringWordSource("f**k|shit")); }