public void MoviesWorldCupControler_Consultar_FiltroVazio_RetornarBadRequest() { MoviesController controller = GerarControllerTesteComMovies(); var response = controller.Consultar(new MoviesConsultaRequest()); HttpTools.AssertExecuteAsyncResponse(response, HttpStatusCode.BadRequest); }
public void MoviesWorldCupController_Consultar_NenhumRegistroEncontrado_RetornarStatusCodeNotFound() { MoviesController controller = GerarControllerTesteComMovies(); var filtro = MontarFiltroPadrao(); var response = controller.Consultar(filtro); HttpTools.AssertExecuteAsyncResponse(response, HttpStatusCode.NotFound); }
public void MoviesWorldCupControler_Consultar_ParametroInvalido_Titulo_RetornarBadRequest() { MoviesController controller = GerarControllerTesteComMovies(); var response = controller.Consultar(new MoviesConsultaRequest { Titulo = TestConstants.TituloInvalido.ToString() }); HttpTools.AssertExecuteAsyncResponse(response, HttpStatusCode.BadRequest); }
public void MoviesWorldCupControler_Consultar_ParametroInvalido_Id_RetornarBadRequest() { MoviesController controller = GerarControllerTesteComMovies(); var response = controller.Consultar(new MoviesConsultaRequest { Id = Convert.ToInt16(TestConstants.IdInvalido) }); HttpTools.AssertExecuteAsyncResponse(response, HttpStatusCode.BadRequest); }
public void MoviesWorldCupControler_Consultar_RegistroEncontrado_RetornarOk() { var movie = EntityTools.GerarMovie("tinc010102"); MoviesController controller = GerarControllerTesteComMovies(movie); var filtro = MontarFiltroPadrao(); var response = controller.Consultar(filtro); HttpTools.AssertExecuteAsyncResponse(response, HttpStatusCode.OK); }