Exemple #1
0
        public void ScopeHolderAndScopeContext_BeSameInstance(IEventScopeFactory factory, Type scopeType)
        {
            var scopeContext = factory.CreateScopeContext();
            var scopeHolder  = factory.CreateScopeHolder();

            scopeContext.Should().BeSameAs(scopeHolder);
        }
        public PerTransactionScopeContextTest()
        {
            this.eventScope = A.Fake<IEventScopeInternal>();
            this.eventScopeFactory = A.Fake<IEventScopeFactory>();

            this.testee = new PerTransactionScopeContext(this.eventScopeFactory);
        }
Exemple #3
0
        public PerTransactionScopeContextTest()
        {
            this.eventScope        = A.Fake <IEventScopeInternal>();
            this.eventScopeFactory = A.Fake <IEventScopeFactory>();

            this.testee = new PerTransactionScopeContext(this.eventScopeFactory);
        }
Exemple #4
0
        public AbstractEventScopeContextTest()
        {
            this.eventScope        = A.Fake <IEventScopeInternal>();
            this.eventScopeFactory = A.Fake <IEventScopeFactory>();

            this.testee = new TestAbstractEventScopeContext(this.eventScopeFactory);
        }
        public AbstractEventScopeContextTest()
        {
            this.eventScope = A.Fake<IEventScopeInternal>();
            this.eventScopeFactory = A.Fake<IEventScopeFactory>();

            this.testee = new TestAbstractEventScopeContext(this.eventScopeFactory);
        }
Exemple #6
0
 protected abstract IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory);
Exemple #7
0
 public PerThreadEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
     this.current = new ThreadLocal <IEventScopeInternal>();
 }
Exemple #8
0
 public PerTransactionScopeContext(IEventScopeFactory scopeFactory)
 {
     this.scopeFactory = scopeFactory;
     this.scopesToTransactionIdentifier = new ConcurrentDictionary <string, SinglePhaseScopeDecorator>();
 }
 protected AbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
 {
     this.ScopeFactory = eventScopeFactory;
 }
 public EventScopingStandardFactory(IEventScopeFactory eventScopeFactory)
 {
     this.eventScopeFactory = eventScopeFactory;
 }
 public PerThreadEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
     this.current = new ThreadLocal<IEventScopeInternal>();
 }
Exemple #12
0
        public void CreateScopeContext_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType)
        {
            IEventScopeContext scopeContext = factory.CreateScopeContext();

            scopeContext.GetType().Should().Be(scopeType);
        }
Exemple #13
0
        public void CreateScopeHolder_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType)
        {
            IEventScopeHolder scopeHolder = factory.CreateScopeHolder();

            scopeHolder.GetType().Should().Be(scopeType);
        }
Exemple #14
0
        public void CreateHandlerDecorator_CreatesDefaultDecorator(IEventScopeFactory factory, Type scopeType)
        {
            IHandler decorator = factory.CreateHandlerDecorator(A.Fake <IHandler>());

            decorator.Should().BeOfType <ScopingHandlerDecorator>();
        }
 public TestAbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
 public PerCallEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
 protected abstract IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory);
 public ConnectionContext(IConnectionScopeFactory factory, IEventScopeFactory eventScopeFactory)
 {
     _factory           = factory;
     _eventScopeFactory = eventScopeFactory;
 }
Exemple #19
0
 public TestAbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
Exemple #20
0
 protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory)
 {
     return(new PerCallEventScopeContext(eventScopeFactory));
 }
Exemple #21
0
        public void CreateScope_CreatesDefaultEventScope(IEventScopeFactory factory, Type scopeType)
        {
            IEventScope eventScope = factory.CreateScope();

            eventScope.Should().BeOfType <EventScope>();
        }
 public PerTransactionScopeContext(IEventScopeFactory scopeFactory)
 {
     this.scopeFactory = scopeFactory;
     this.scopesToTransactionIdentifier = new ConcurrentDictionary<string, SinglePhaseScopeDecorator>();
 }
Exemple #23
0
 public EventScopingStandardFactory(IEventScopeFactory eventScopeFactory)
 {
     this.eventScopeFactory = eventScopeFactory;
 }
Exemple #24
0
 public ConnectionContext(IEventScopeFactory eventScopeFactory)
 {
     _eventScopeFactory = eventScopeFactory;
 }
 protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory)
 {
     return new PerCallEventScopeContext(eventScopeFactory);
 }
Exemple #26
0
 protected AbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
 {
     this.ScopeFactory = eventScopeFactory;
 }
Exemple #27
0
 public PerCallEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }