public void Can_Process_Comment_When_Akistmet_Is_Enabled_And_Delete_Is_Disabled_Ham()
        {
            var comment = MockObjectFactory.CreateCommentRepository();
            var settings = MockObjectFactory.CreateSettingsRepository(2);
            var akismet = MockObjectFactory.CreateAkismetService();
            var error = MockObjectFactory.CreateErrorLogger();
            var commentEntity = GetHamComment(1001,5);
            var requestData = new RequestData();

            var commentProcessorPipeline = new CommentProcessorPipeline(comment, settings, akismet, error, commentEntity, requestData);
            var akismetStatus = commentProcessorPipeline.ProcessComment();

            Assert.IsFalse(akismetStatus.IsSpam);
            Assert.IsTrue(akismetStatus.IsHam);

            var commentsByPost = comment.GetCommentsByPostID(5);
            Assert.IsNotNull(commentsByPost.First());
            Assert.AreEqual(commentEntity.CommentContent, commentsByPost.First().CommentContent);
        }
        public void Can_Process_Comment_When_Akistmet_Is_Enabled_And_Delete_Is_Disabled_Spam()
        {
            var comment = MockObjectFactory.CreateCommentRepository();
            var settings = MockObjectFactory.CreateSettingsRepository(2);
            var akismet = MockObjectFactory.CreateAkismetService();
            var error = MockObjectFactory.CreateErrorLogger();
            var commentEntity = GetSpamComment(1002, 6);
            var requestData = new RequestData();

            var commentProcessorPipeline = new CommentProcessorPipeline(comment, settings, akismet, error, commentEntity, requestData);
            var akismetStatus = commentProcessorPipeline.ProcessComment();

            Assert.IsTrue(akismetStatus.IsSpam);
            Assert.IsFalse(akismetStatus.IsHam);

            var commentsByPost = comment.GetAllComments();
            var commentInQn = commentsByPost.Single(c => c.CommentID == 1002 && c.PostID == 6);
            Assert.IsNotNull(commentInQn);
            Assert.AreEqual(2, commentInQn.CommentStatus);
        }