Exemplo n.º 1
0
        public void WithSubstitutionChanged_RegistersSubstitutedUserForCommit()
        {
            bool commitOnClassWasCalled = false;

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

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