예제 #1
0
        public void WithSubstitutionDeleted_RegistersSubstitutedUserForCommit()
        {
            bool commitOnClassWasCalled = false;

            _substitutedUser.Committing += (sender, e) =>
            {
                commitOnClassWasCalled = true;
                Assert.That(GetDataContainer((DomainObject)sender).HasBeenMarkedChanged, Is.True);
            };
            _substitution.Delete();
            ClientTransaction.Current.Commit();

            Assert.That(commitOnClassWasCalled, Is.True);
        }