Esempio n. 1
0
        public void Cancel_NotCommitted_Success()
        {
            using (var transaction = new TestDesignerTransaction())
            {
                transaction.Cancel();
                Assert.Equal(1, transaction.CancelCount);
                Assert.True(transaction.Canceled);

                transaction.Cancel();
                Assert.Equal(1, transaction.CancelCount);
                Assert.True(transaction.Canceled);
            }
        }
Esempio n. 2
0
        public void Commit_Cancelled_Success()
        {
            using (var transaction = new TestDesignerTransaction())
            {
                transaction.Cancel();

                transaction.Commit();
                Assert.Equal(0, transaction.CommitCount);
                Assert.False(transaction.Committed);
            }
        }