public void Test_Find_FindOrganizationInDb() { //Arrange Organization testOrganization = new Organization("SaveTheDolphins", "www.savethedophins.org", "*****@*****.**", "Saving the Planet from squirrel people.", "Large bio info"); testOrganization.Save(); //Act Organization foundOrganization = Organization.Find(testOrganization.GetId()); //Assert Assert.Equal(testOrganization, foundOrganization); }
public void Test_UpdateOrganizationEmailInDB() { //Arrange Organization testOrganizationEmail = new Organization("SaveTheMoistOwlet", "wwww.savethemoistowlet.com", "*****@*****.**", "Save the Planet from evil humans who want to spray owlets with water.", "Large bio info"); testOrganizationEmail.Save(); string updateOrganizationEmail = "*****@*****.**"; //Act testOrganizationEmail.Update(updateOrganizationEmail); string resultEmail = testOrganizationEmail.GetEmail(); //Assert Assert.Equal(updateOrganizationEmail, resultEmail); }
public void Test_Save_SaveOrganizationToDB() { //Arrange Organization testOrganization = new Organization("SaveTheDolphins", "www.savethedophins.org", "*****@*****.**", "Saving the Planet from squirrel people.", "Large bio info"); testOrganization.Save(); //Act List <Organization> result = Organization.GetAll(); List <Organization> testList = new List <Organization> { testOrganization }; //Assert Assert.Equal(testList, result); }
public void Test_UpdateOrganizationBioInDB() { //Arrange Organization testOrganizationBio = new Organization("SaveTheMoistOwlet", "wwww.savethemoistowlet.com", "*****@*****.**", "Save the Planet from evil humans who want to burn things:(", "Large bio info"); testOrganizationBio.Save(); string updateOrganizationBio = "Saving the planet."; //Act testOrganizationBio.Update(updateOrganizationBio); string resultBio = testOrganizationBio.GetBio(); //Assert Assert.Equal(updateOrganizationBio, resultBio); }