Exemple #1
0
        public void CommentSpammed_Should_Decrease_Score()
        {
            var comment = new Mock <IComment>();

            comment.SetupGet(c => c.ByUser).Returns(new Mock <IUser>().Object);

            _user.Setup(u => u.DecreaseScoreBy(It.IsAny <decimal>(), UserAction.SpamCommentSubmitted)).Verifiable();
            _userScoreService.CommentSpammed(new CommentSpamEventArgs(comment.Object, _user.Object, string.Empty));
        }
Exemple #2
0
 public void CommentSpammed_Should_Decrease_Score()
 {
     _user.Expect(u => u.DecreaseScoreBy(It.IsAny <decimal>(), UserAction.SpamCommentSubmitted)).Verifiable();
     _userScoreService.CommentSpammed(_user.Object);
 }