예제 #1
0
        public void DeleteComment()
        {
            var commentCommand = new CommentDeleted()
            {
                CommentId = 6
            };

            var response = commentService.DeleteComment(commentCommand);

            Assert.AreEqual(response.Type, Common.ServiceResponseTypes.Success);
        }
예제 #2
0
        public void Handle(CommentDeleted @event)
        {
            var comment = _commentService.GetCommentById(@event.CommentId);

            if (comment == null || !comment.Deleted)
            {
                return;
            }

            // lets delete any comment notifications that may have been created.
            _messageService.DeleteNotificationsForComment(comment.Id);
        }
예제 #3
0
        public void Handle(DeleteComment request)
        {
            var msg = new CommentDeleted(request.CommentId);

            Send(msg);
        }