예제 #1
0
    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);
    }
예제 #2
0
    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);
        }
예제 #4
0
 public void Setup()
 {
     MaskWordFilter = new MaskWordFilter(new StringWordSource("f**k|shit"));
 }