示例#1
0
        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);
        }
示例#2
0
        public void Executar(TCommand cmd)
        {
            _transactional.BeginTransaction();

            try
            {
                _commandHandler.Executar(cmd);
                _transactional.Commit();
            }
            catch
            {
                _transactional.Rollback();
                throw;
            }
        }