public void ResultData_Update_InValid_Data_Null_Should_Fail() { // Arrange var myData = new ResultDataModel(); // Act var result = myData.Update(null); // Assert Assert.AreEqual(false, result); }
public void ResultData_Update_Valid_Data_Good_Should_Pass() { // Arrange var myData = new ResultDataModel(); var myDataNew = new ResultDataModel { LabResult = 11, ID = myData.ID }; // Act myData.Update(myDataNew); myData.Date = myData.Date.AddSeconds(-5); // Assert Assert.AreEqual(11, myData.LabResult); // Data fields that should NOT match Assert.AreNotEqual(myData.Date, myDataNew.Date); Assert.AreNotEqual(myData.ResultCode, myDataNew.ResultCode); // Should not match }