public void Donor_delete(int ID) { Donor.Delete(ID); Insert_Donor_GridView.DataBind(); Update_Donor_GridView.DataBind(); Delete_Donor_GridView.DataBind(); }
public void Delete_DeletesDonorAssociationsFromDatabase_DonorList() { //Arrange Patient testPatient = new Patient("Tim", "9999999", "03/05/75", "IIRh-", "Ds"); testPatient.Save(); Donor testDonor = new Donor("Tim", "3333333", "08/11/93", "IIIRh+", "Healthy"); testDonor.Save(); //Act testDonor.AddPatient(testPatient); testDonor.Delete(); List <Donor> resultDonorPatients = testPatient.GetDonors(); List <Donor> testDonorPatients = new List <Donor> { }; //Assert CollectionAssert.AreEqual(testDonorPatients, resultDonorPatients); }