Beispiel #1
0
        public void GetComment_WhenEmptyContext_ReturnsNull()
        {
            // Arrange
            var id = 1;

            // Act
            var commentDto = _commentManager.GetAsync(id).GetAwaiter().GetResult();

            // Assert
            Assert.Null(commentDto);
        }
Beispiel #2
0
        public async Task <EntityDto <long> > CreateReply(CreateReplyInput input)
        {
            var currentUser = await GetCurrentUserAsync();

            var comment = await _commentManager.GetAsync(input.CommentId);

            var reply = await _replyManager.CreateAsync(Reply.Create(input.Content, comment, currentUser));

            return(new EntityDto <long>(reply.Id));
        }