public void Transactional_Unit_Set2_NotChangedAndCommitted() { String currentValue = "Current"; String originalValue = "Original"; Transactional<String> target = new Transactional<String>(currentValue, originalValue); String value = currentValue; Boolean commit = true; target.Set(value, commit); Assert.AreEqual(currentValue, target.CurrentValue); Assert.AreEqual(originalValue, target.OriginalValue); }
public void Transactional_Unit_Set1_Optimal() { String currentValue = "Current"; String originalValue = "Original"; Transactional<String> target = new Transactional<String>(currentValue, originalValue); String value = "Test"; target.Set(value); Assert.AreEqual(value, target.CurrentValue); Assert.AreEqual(originalValue, target.OriginalValue); }