Esempio n. 1
0
 public async Task <HttpResponseMessage> GetComments(Guid postId)
 {
     return(await _webApiResponseHandle.CreateHttpResponse <IEnumerable <CommentOutput> >(Request, () =>
     {
         var commentsDTO = _commentAppService.GetComments(postId);
         return commentsDTO;
     }));
 }
        public async void GetComments_Test_ShouldBeNotNull()
        {
            InitComment();
            var postId   = this.UsingDbContext <Post>(a => a.Post.FirstOrDefault()).Id;
            var comments = await _commentAppService.GetComments(postId);

            Assert.Equal(4, comments.Count());

            this.Dispose();
        }