public void AddSocialRelationHistory_Success() { //Arrange var srModel = new SocialRelationshipHistoryViewModel { SocialRelationshipDetailID = 0, SocialRelationshipID = 10003, FamilyRelationshipID = 1, ChildhoodHistory = "No Children", RelationShipHistory = "No RelationShip", FamilyHistory = "Living with Family.", IsDeceased = false, IsInvolved = true, FirstName = "Peter", LastName = "Parker", RelationshipTypeID = 1, ReviewedNoChanges = false, ContactID = 1, EncounterID = null, TakenBy = 1, TakenTime = DateTime.Now, ForceRollback = true }; // Act var response = controller.AddSocialRelationHistory(srModel); // Assert Assert.IsNotNull(response, "Response can not be null"); Assert.IsTrue(response.ID > 0, "Social Relationship could not be created."); }
public Response <SocialRelationshipHistoryViewModel> UpdateSocialRelationHistory(SocialRelationshipHistoryViewModel model) { model.TakenTime = model.TakenTime.ToUniversalTime(); return(_socialRelationshipHistoryRepository.UpdateSocialRelationHistory(model)); }