public async Task Should_Get_List_Of_Comments() { var post = (await _postRepository.GetListAsync()).FirstOrDefault(); await _commentRepository.InsertAsync(new Comment(Guid.NewGuid(), post.Id, null, "qweasd")); await _commentRepository.InsertAsync(new Comment(Guid.NewGuid(), post.Id, null, "qweasd")); var comments = await _commentAppService.GetHierarchicalListOfPostAsync(post.Id); comments.Count.ShouldBeGreaterThan(2); }
public Task <List <CommentWithRepliesDto> > GetHierarchicalListOfPostAsync(Guid postId) { return(_commentAppService.GetHierarchicalListOfPostAsync(postId)); }