public async Task Should_Get_All_Post() { var posts = await _postAppService.GetAllPost(); posts.Count().ShouldBe(4); this.Dispose(); }
public async Task <JsonResponse> PostList() { try { var posts = await _postAppService.GetAllPost(); return(new JsonResponse(posts, 200)); } catch (Exception e) { throw e; } }
public IActionResult AdminGetAllPost(int page = 1, int pageSize = 10) { return(Ok(_postAppService.GetAllPost(page, pageSize))); }