public void With_filtering_disabled_the_original_content_is_returned(string contentToFilter, string expectedOutput)
        {
            Given_that_there_is_a_list_of_negative_words();
            var manageContentsNegativeWords = new ManageContent(new FilterBySplittingWordsStrategy(_negativeWordsRepositoryMock.Object, true));

            Assert.That(manageContentsNegativeWords.FilterNegativeWords(contentToFilter), Is.EqualTo(expectedOutput));
        }
        public void Correct_count_of_bad_words_is_given(string contentToFilter, int expectedNegativeWordCount)
        {
            Given_that_there_is_a_list_of_negative_words();
            var manageContentsNegativeWords = new ManageContent(new FilterBySplittingWordsStrategy(_negativeWordsRepositoryMock.Object));

            Assert.That(manageContentsNegativeWords.CountNegativeWords(contentToFilter), Is.EqualTo(expectedNegativeWordCount));
        }
        public void Negative_words_middle_should_be_replaced_with_filtering_enabled(string contentToFilter, string expectedOutput)
        {
            Given_that_there_is_a_list_of_negative_words();
            var manageContentsNegativeWords = new ManageContent(new FilterBySplittingWordsStrategy(_negativeWordsRepositoryMock.Object));

            Assert.That(manageContentsNegativeWords.FilterNegativeWords(contentToFilter), Is.EqualTo(expectedOutput));
        }
Пример #4
0
        public void LoadManageContentTab()
        {
            Frame         manageContentFrame = new Frame();
            ManageContent manageContent      = new ManageContent();

            manageContentFrame.Content = manageContent;
            ManageContent.Content      = manageContentFrame;
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class
 /// </summary>
 /// <param name="manageContent">manage Manage Content</param>
 public HomeController(ManageContent manageContent)
 {
     this._manageContent = manageContent;
 }