Exemple #1
0
        public void RaiseReferenceInitializatingEvent_ResetsFlagAfterNotification()
        {
            var order = _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => o));

            Dev.Null = _transaction.ExecuteInScope(() => order.OrderNumber); // succeeds
        }
Exemple #2
0
 public void RaiseReferenceInitializatingEvent_CallsReferenceInitializing_DeleteForbidden()
 {
     _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => { o.Delete(); return(o); }));
 }
Exemple #3
0
 public void RaiseReferenceInitializatingEvent_CallsReferenceInitializing_CurrentPropertyForbidden()
 {
     _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => o.CurrentProperty));
 }
Exemple #4
0
        public void RaiseReferenceInitializatingEvent_CallsReferenceInitializing_TransactionContextIsRestricted()
        {
            var result = _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => o.DefaultTransactionContext));

            Assert.That(result, Is.TypeOf(typeof(InitializedEventDomainObjectTransactionContextDecorator)));
        }
Exemple #5
0
 public void RaiseReferenceInitializatingEvent_CallsReferenceInitializing_PropertyAccessForbidden()
 {
     _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => o.OrderNumber));
 }