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); }
public PerTransactionScopeContextTest() { this.eventScope = A.Fake <IEventScopeInternal>(); this.eventScopeFactory = A.Fake <IEventScopeFactory>(); this.testee = new PerTransactionScopeContext(this.eventScopeFactory); }
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); }
protected abstract IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory);
public PerThreadEventScopeContext(IEventScopeFactory eventScopeFactory) : base(eventScopeFactory) { this.current = new ThreadLocal <IEventScopeInternal>(); }
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>(); }
public void CreateScopeContext_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType) { IEventScopeContext scopeContext = factory.CreateScopeContext(); scopeContext.GetType().Should().Be(scopeType); }
public void CreateScopeHolder_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType) { IEventScopeHolder scopeHolder = factory.CreateScopeHolder(); scopeHolder.GetType().Should().Be(scopeType); }
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) { }
public ConnectionContext(IConnectionScopeFactory factory, IEventScopeFactory eventScopeFactory) { _factory = factory; _eventScopeFactory = eventScopeFactory; }
protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory) { return(new PerCallEventScopeContext(eventScopeFactory)); }
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>(); }
public ConnectionContext(IEventScopeFactory eventScopeFactory) { _eventScopeFactory = eventScopeFactory; }
protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory) { return new PerCallEventScopeContext(eventScopeFactory); }