public void Transactional_Unit_Commit_NotChanged() { String currentValue = "Current"; String originalValue = currentValue; Transactional<String> target = new Transactional<String>(currentValue, originalValue); target.Commit(); Assert.AreEqual(currentValue, target.CurrentValue); Assert.AreEqual(currentValue, target.OriginalValue); }
public void Executar(TCommand cmd) { _transactional.BeginTransaction(); try { _commandHandler.Executar(cmd); _transactional.Commit(); } catch { _transactional.Rollback(); throw; } }