public void GetIllustratorTest() { methodTestingHere = MethodBase.GetCurrentMethod().Name.Replace("Test", ""); var Test1 = _SearchBooksrepository.GetIllustrator("n", "ascending"); result = Test1.Count == 3 ? result = Result.Ok : result = Result.Falhou; var Test2 = _SearchBooksrepository.GetIllustrator("x", "ascending"); result = Test2.Count == 0 ? result = Result.Ok : result = Result.Falhou; ListaDeTestes.Add(new EntitysTest() { Classe = classTestingHere, Metodo = methodTestingHere, Resultado = result.ToString() }); //Próximo metodo GetGenresTest(); }
public ActionResult<List<Books>> GetIllustrator(string param, string sort) { try { var GetIllustrator = _SearchBooksrepository.GetIllustrator(param, sort); if (GetIllustrator != null && GetIllustrator.Count > 0) { return Ok(GetIllustrator); } else { return BadRequest(); } } catch (ArgumentException e) { return StatusCode((int)HttpStatusCode.InternalServerError, e.Message); } }