public void Clinic_Update_InValid_Data_Null_Should_Fail() { // Arrange var myData = new ClinicModel(); // Act var result = myData.Update(null); // Assert Assert.AreEqual(false, result); }
public void Clinic_Update_Valid_Data_Good_Should_Pass() { // Arrange var myData = new ClinicModel(); var myDataNew = new ClinicModel { Name = "Bellevue Hospital", Address = "13 Bellevue Dr.", City = "Bellevue", Country = "USA", Contact = "John Appleseed", Phone = "+14254254252", Email = "*****@*****.**", Notes = "Newly opened", Latitude = "6.2117902", Longitude = "6.7115102", ID = myData.ID }; // Act myData.Update(myDataNew); myData.Date = myData.Date.AddSeconds(-5); // Assert Assert.AreEqual("Bellevue Hospital", myData.Name); Assert.AreEqual("13 Bellevue Dr.", myData.Address); Assert.AreEqual("Bellevue", myData.City); Assert.AreEqual("USA", myData.Country); Assert.AreEqual("John Appleseed", myData.Contact); Assert.AreEqual("+14254254252", myData.Phone); Assert.AreEqual("*****@*****.**", myData.Email); Assert.AreEqual("Newly opened", myData.Notes); Assert.AreEqual("6.2117902", myData.Latitude); Assert.AreEqual("6.7115102", myData.Longitude); Assert.AreNotEqual(myData.Date, myDataNew.Date); }