示例#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);
        }
        public void Handle(DeleteComment request)
        {
            var msg = new CommentDeleted(request.CommentId);

            Send(msg);
        }