public async void Edit_ReturnsANotFoundResult(int?guestAttendeeId) { //Arrange GuestAttendeesController guestAttendeesController = new GuestAttendeesController(context); //Act var result = await guestAttendeesController.Edit(guestAttendeeId); //Assert Assert.IsType <NotFoundResult>(result); }
public async void Edit_Post_RedirectToActionResult() { //Arrange GuestAttendeesController guestAttendeesController = new GuestAttendeesController(context); //Act var result = await guestAttendeesController.Edit(1, context.GuestAttendee.First()); //Assert Assert.IsType <RedirectToActionResult>(result); }
public async void Edit_ReturnsAViewResult() { //Arrange GuestAttendeesController guestAttendeesController = new GuestAttendeesController(context); //Act var result = await guestAttendeesController.Edit(1); //Assert Assert.IsType <ViewResult>(result); }
public async void Edit_Post_ReturnsANotFoundEventResult() { //Arrange GuestAttendeesController guestAttendeesController = new GuestAttendeesController(context); //Act var result = await guestAttendeesController.Edit(2, new GuestAttendee() { Id = 2 }); //Assert Assert.IsType <NotFoundResult>(result); }