Beispiel #1
0
        public void RollbackInReadOnlyMiddleTransaction_IsForbidden()
        {
            Assert.That(ReadOnlyRootTransaction.HasChanged(), Is.True);
            Assert.That(ReadOnlyMiddleTransaction.HasChanged(), Is.True);
            Assert.That(WriteableSubTransaction.HasChanged(), Is.True);

            CheckForbidden(() => ReadOnlyMiddleTransaction.Rollback(), "TransactionRollingBack");

            Assert.That(ReadOnlyRootTransaction.HasChanged(), Is.True);
            Assert.That(ReadOnlyMiddleTransaction.HasChanged(), Is.True);
            Assert.That(WriteableSubTransaction.HasChanged(), Is.True);
        }
Beispiel #2
0
        public void CommitInReadOnlyMiddleTransaction_IsForbidden()
        {
            Assert.That(ReadOnlyRootTransaction.HasChanged(), Is.True);
            Assert.That(ReadOnlyMiddleTransaction.HasChanged(), Is.True);
            Assert.That(WriteableSubTransaction.HasChanged(), Is.True);

            CheckForbidden(() => ReadOnlyMiddleTransaction.Commit(), "TransactionCommitting");

            Assert.That(ReadOnlyRootTransaction.HasChanged(), Is.True);
            Assert.That(ReadOnlyMiddleTransaction.HasChanged(), Is.True);
            Assert.That(WriteableSubTransaction.HasChanged(), Is.True);
        }