public void FillKeysTest() { _parentEntity.Child = _childEntity; _parentEntity.Client = _clientEntity; var result = _parentEntity.FillKeys(); Assert.AreEqual(result.ChildId, 1); Assert.AreEqual(result.ClientId, 2); Assert.AreEqual(result, _parentEntity); }
public void FillKeysOnNullAssociationProperties() { // Подготовка. var entity = new ParentEntity(); entity.ClientId = -1; entity.Client = null; // Действие. var result = entity.FillKeys(); // Проверка. Assert.AreEqual(-1, result.ClientId); }