public void TestApplyingInsertValues() { //--Arrange var client = new Client(); //--Act ColumnValueProvider.ApplyInsertValues(client); //--Assert Assert.AreEqual(_currentUserId, client.CreatedByUserId); Assert.AreEqual(_currentUserId, client.ModifiedByUserId); }
public void TestApplyingInsertValuesWhereFieldDefinedByMapAndBuilder() { //--Arrange var clientUser = new ClientUser { UserId = _currentUserId, IsActive = true }; //--Act ColumnValueProvider.ApplyInsertValues(clientUser); //--Assert Assert.AreEqual(_currentClientId, clientUser.ClientId); Assert.AreEqual(_currentUserId, clientUser.UserId); Assert.AreEqual(true, clientUser.IsActive); }