public async Task GetUsefulDocumentationsAsync_ByPage_IsSuccessful(string page) { var docs = await _repo.GetUsefulDocumentationsAsync(page : page); var doc = docs.FirstOrDefault(); Assert.NotNull(docs); Assert.NotEmpty(docs); Assert.NotNull(doc); Assert.NotEqual(0, doc.Id); Assert.NotEqual(Guid.Empty, doc.PublicKey); Assert.NotNull(doc.Page); Assert.NotNull(doc.Name); Assert.NotNull(doc.Url); Assert.NotNull(doc.Category); }
public async Task <IActionResult> GetUsefulDocumentationAsync( [FromQuery] string page, [FromQuery] string category) { return(Ok(await _repo.GetUsefulDocumentationsAsync(page, category))); }