public void RemoveAppointmentTest() { // Arrange AppointmentRemove appointment = new AppointmentRemove(); // Act var result = appointment.DeleteAppointment(1002); // Assert Assert.IsTrue(result); }
/// <summary> /// This Action calls for the button which can delete an Appointment /// </summary> /// <returns>The form view which contains list of Appointments after deleting a paricular Appointment</returns> public ActionResult RemoveAppointmentData(int id) { if (Session["userId"] == null) { return(Redirect("~")); } AppointmentRemove Appointment = new AppointmentRemove(); Appointment.DeleteAppointment(id); return(RedirectToAction("Appointments")); }