public void Clinic_Create_Default_Should_Pass() { // Arrange var myController = new ClinicController(); // Act var result = myController.Create(); // Assert Assert.IsNotNull(result); }
public void Clinic_Create_Post_Default_Should_Pass() { // Arrange var myController = new ClinicController(); var myData = new ClinicModel(); // Act var result = myController.Create(myData); // Reset // Assert Assert.IsNotNull(result); }
public void Clinic_Create_Post_Invalid_Model_Should_Send_Back_For_Edit() { // Arrange var controller = new ClinicController(); var data = new ClinicModel(); // Make ModelState Invalid controller.ModelState.AddModelError("test", "test"); // Act var result = controller.Create(data) as RedirectToActionResult; // Assert Assert.AreEqual("Error", result.ActionName); }