Пример #1
0
        public void RaiseReferenceInitializatingEvent_ResetsFlagAfterNotification()
        {
            var order = _transaction.ExecuteInScope(() => DomainObjectTestHelper.ExecuteInReferenceInitializing_NewObject(o => o));

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

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