public async void Task_Add_AddHotelType_Return_OkResult() { var controller = new HotelTypeController(context); var hoteltype = new HotelType() { HotelTypeName = "Villa1", HotelTypeDescription = "Nice!" }; var data = await controller.Post(hoteltype); Assert.IsType <CreatedAtActionResult>(data); }
public async void Task_Add_AddHotelType_Return_BadRequest() { var controller = new HotelTypeController(context); var hoteltype = new HotelType() { HotelTypeName = "Villa Resort!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", HotelTypeDescription = "Nice!" }; var data = await controller.Post(hoteltype); Assert.IsType <BadRequestResult>(data); }
public async void Task_Add_AddHotelType_return_BadResult() { //Arrange var controller = new HotelTypeController(context); var hoteltype = new HotelType() { HotelTypeName = "Hotel Type Name is Hotel", HotelTypeDescription = "Hotel Description", }; //Act var data = await controller.Post(hoteltype); //Assert Assert.IsType <CreatedAtActionResult>(data); }