public void UpdateCollateral_Success()
        {
            // Act
            var updateCollateral = new CollateralViewModel
            {
                ParentContactID         = 0,
                ContactID               = 1,
                ContactTypeID           = 4,
                FirstName               = "firstName1",
                LastName                = "lastName1",
                LivingWithClientStatus  = false,
                ReceiveCorrespondenceID = 2,
                ContactRelationshipID   = 2,
                RelationshipTypeID      = 3,
                IsActive                = true,
                ModifiedBy              = 5,
                ModifiedOn              = DateTime.Now,
                ForceRollback           = true
            };

            var response = controller.UpdateCollateral(updateCollateral);

            // Assert
            Assert.IsTrue(response.RowAffected > 0, "Collateral could not be updated.");
        }
        public void UpdateCollateral_Success()
        {
            // Arrange
            PrepareResponse(colleteralDataForSuccess);

            mock.Setup(r => r.UpdateCollateral(It.IsAny <CollateralModel>()))
            .Callback((CollateralModel collateralModel) => collaterals.Add(collateralModel))
            .Returns(collateralResponse);

            //Act
            var updateCollateral = new CollateralModel
            {
                ParentContactID         = 0,
                ContactID               = 2,
                ContactTypeID           = 4,
                FirstName               = "firstName1",
                LastName                = "lastName1",
                LivingWithClientStatus  = false,
                ReceiveCorrespondenceID = 2,
                ContactRelationshipID   = 2,
                RelationshipTypeID      = 3,
                IsActive                = true,
                ModifiedBy              = 5,
                ModifiedOn              = DateTime.Now,
                ForceRollback           = true
            };
            var updateCollateralResult = collateralController.UpdateCollateral(updateCollateral);
            var response = updateCollateralResult as HttpResult <Response <CollateralModel> >;

            //Assert
            Assert.IsNotNull(response, "Response can't be null");
            Assert.IsTrue(response.Value.ResultCode == 0, "Collateral could not be updated.");
            Assert.IsTrue(response.Value.RowAffected != 0, "Collateral could not be updated.");
        }