public void UserGetById_Ok() { using var apiContext = ApiTestContext.GetApiAppContext(); var userController = new UserController(apiContext); var firtsId = userController.Get().ToList()[0].userId; var result = userController.Get(firtsId.ToString()); Assert.IsType <OkObjectResult>(result.Result); }
public void UserGetById_BadRequest() { // AAA Arrange (Preparar), Act (Actuar), Assert (Afirmar). using var apiContext = ApiTestContext.GetApiAppContext(); var userController = new UserController(apiContext); var result = userController.Get(""); Assert.IsType <BadRequestResult>(result.Result); }
public void UserGet_ById_BadRequest() { //AAA using var apiContext = ApiTestContext.GetApiAppContext(); var userController = new UserController(apiContext); var result = userController.Get(""); Assert.IsType <BadRequestResult>(result.Result); }
public void UserGet() { // AAA Arrange (Preparar), Act (Actuar), Assert (Afirmar). using var apiContext = ApiTestContext.GetApiAppContext(); var userController = new UserController(apiContext); var result = userController.Get(); Assert.NotEmpty(result); }
public void UserGet() { //AAA using var apiContext = ApiTestContext.GetApiAppContext(); var userController = new UserController(apiContext); var result = userController.Get(); Assert.NotEmpty(result); }