コード例 #1
0
        public void CommentMarkedAsOffended_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.CommentMarkedAsOffended)).Verifiable();
            _userScoreService.CommentMarkedAsOffended(new CommentMarkAsOffendedEventArgs(comment.Object, _user.Object, string.Empty));
        }
コード例 #2
0
 public void CommentMarkedAsOffended_Should_Decrease_Score()
 {
     _user.Expect(u => u.DecreaseScoreBy(It.IsAny <decimal>(), UserAction.CommentMarkedAsOffended)).Verifiable();
     _userScoreService.CommentMarkedAsOffended(_user.Object);
 }