public void Delete_DeletesTutorInDb_TutorList() { Tutor newTutor1 = new Tutor("Sean", "Miller", "*****@*****.**", "1234567890", 1, true, "Weekends", 25.00); newTutor1.Save(); Tutor newTutor2 = new Tutor("Sean", "Miller", "*****@*****.**", "1234567890", 1, true, "Weekends", 25.00); newTutor2.Save(); Tutor.Delete(newTutor1.Id); List <Tutor> expectedList = new List <Tutor> { newTutor2 }; List <Tutor> actualList = Tutor.GetAll(); CollectionAssert.AreEqual(expectedList, actualList); }
public ActionResult DeleteTutor(int id) { Tutor.Delete(id); return(RedirectToAction("Tutors", "Home")); }