public void DeleteAll_DeletesAllinviteesFromDatabase() { //Arrange string inviteeName = "Jane Doe"; string inviteeEmailAddress = "*****@*****.**"; Invitee newInvitee = new Invitee(inviteeName, inviteeEmailAddress); newInvitee.Save(); Invitee.DeleteAll(); //Act List <Invitee> newList = new List <Invitee> { newInvitee }; List <Invitee> resultList = Invitee.GetAll(); //Assert CollectionAssert.AreNotEqual(newList, resultList); }
public ActionResult DeleteAll() { Invitee.DeleteAll(); return(RedirectToAction("Index")); }