public void DeletePatientExistingPatientTest() { // Arrange PatientRemove patientRemove = new PatientRemove(); // Act var result = patientRemove.DeletePatient(43); // Assert Assert.IsTrue(result); }
public void DeletePatientNonExistingPatientTest() { // Arrange PatientRemove patientRemove = new PatientRemove(); // Act var result = patientRemove.DeletePatient(0); // Assert Assert.IsFalse(result); }
/// <summary> /// This Action calls for the button which can delete a Patient /// </summary> /// <returns>The form view which contains list of Patients after deleting a paricular Patient</returns> public ActionResult RemovePatientUser(int id) { if (Session["userId"] == null) { return(Redirect("~")); } PatientRemove Patient = new PatientRemove(); Patient.DeletePatient(id); return(RedirectToAction("Patients")); }