예제 #1
0
        public void CommentMarkedAsOffended_Should_SendMail()
        {
            var comment = new Mock <IComment>();

            _emailSender.Setup(es => es.NotifyCommentAsOffended(It.IsAny <string>(), It.IsAny <IComment>(), It.IsAny <IUser>())).Verifiable();

            _sendMail.CommentMarkedAsOffended(new CommentMarkAsOffendedEventArgs(comment.Object, new Mock <IUser>().Object, "http://dotnetshoutout.com"));

            _emailSender.Verify();
        }