public void CreatesStandardSynchronousHandlers(Type handlerType)
        {
            var testee = new EventScopingStandardFactory(new FakeDecoratorCreatingEventScopeFactory());

            IHandler handler = testee.CreateHandler(handlerType);

            handler.GetType().Should().Be(handlerType);
        }
Esempio n. 2
0
        public void CreatesStandardSynchronousHandlers(Type handlerType)
        {
            var testee = new EventScopingStandardFactory(new FakeDecoratorCreatingEventScopeFactory());

            IHandler handler = testee.CreateHandler(handlerType);

            handler.GetType().Should().Be(handlerType);
        }
        public void DecoratesAsynchronousHandlerWithScopingHandler(Type handlerType)
        {
            var testee = new EventScopingStandardFactory(new FakeDecoratorCreatingEventScopeFactory());

            IHandler handler = testee.CreateHandler(handlerType);

            handler.Should()
                   .BeOfType<FakeDecorator>()
                   .And.Subject.As<FakeDecorator>()
                   .DecoratedHandlerType.Should()
                   .Be(handlerType);
        }
Esempio n. 4
0
        public void DecoratesAsynchronousHandlerWithScopingHandler(Type handlerType)
        {
            var testee = new EventScopingStandardFactory(new FakeDecoratorCreatingEventScopeFactory());

            IHandler handler = testee.CreateHandler(handlerType);

            handler.Should()
            .BeOfType <FakeDecorator>()
            .And.Subject.As <FakeDecorator>()
            .DecoratedHandlerType.Should()
            .Be(handlerType);
        }