public void UpdateEmergencyContact_Success() { //Act Mock_EmergencyContact_Success(); var updateEmergencyContact = new EmergencyContactModel { ParentContactID = 3, ContactID = 2, ContactTypeID = 3, FirstName = "firstName11", LastName = "lastName11", GenderID = 1, DOB = DateTime.Now, SuffixID = 2, ContactRelationshipID = 2, RelationshipTypeID = 4, IsActive = true, ModifiedBy = 5, ModifiedOn = DateTime.Now, ForceRollback = true }; var updateEmergencyContactResult = emergencyContactController.UpdateEmergencyContact(updateEmergencyContact); var response = updateEmergencyContactResult as HttpResult <Response <EmergencyContactModel> >; var emergencyContact = response.Value; //Assert Assert.IsNotNull(emergencyContact); Assert.IsTrue(emergencyContact.RowAffected > 0, "Emergency Contact could not be updated."); }
public void UpdateAdditionalDemographic_Success() { // Act var updateEmergencyContact = new EmergencyContactViewModel { ParentContactID = 0, ContactID = 20, ContactTypeID = 3, FirstName = "firstName1", LastName = "lastName1", IsActive = true, ModifiedBy = 5, ModifiedOn = DateTime.Now, ForceRollback = true }; var response = controller.UpdateEmergencyContact(updateEmergencyContact); // Assert Assert.IsTrue(response.RowAffected > 0, "Emergency contact could not be updated."); }