Example #1
0
        private JustSaying.JustSayingBus CreateSystemUnderTest()
        {
            var serializerRegister = new FakeSerializationRegister();
            var bus = new JustSaying.JustSayingBus(Config,
                                                   serializerRegister,
                                                   LoggerFactory,
                                                   Monitor);

            bus.SetGroupSettings(new SubscriptionGroupSettingsBuilder()
                                 .WithDefaultConcurrencyLimit(8),
                                 new Dictionary <string, SubscriptionGroupConfigBuilder>());

            return(bus);
        }
Example #2
0
        private void GivenInternal()
        {
            Queues  = new List <ISqsQueue>();
            Handler = new InspectableHandler <SimpleMessage>();

            var testResolver = new FakeServiceResolver(sc => sc
                                                       .AddLogging(l => l.AddXUnit(OutputHelper)));

            Middleware            = new HandlerMiddlewareBuilder(testResolver, testResolver).UseHandler(ctx => Handler).Build();
            Monitor               = new TrackingLoggingMonitor(LoggerFactory.CreateLogger <TrackingLoggingMonitor>());
            SerializationRegister = new FakeSerializationRegister();
            MiddlewareMap         = new MiddlewareMap();

            Given();
        }
        private void GivenInternal()
        {
            Queues  = new List <ISqsQueue>();
            Handler = new InspectableHandler <SimpleMessage>();
            Monitor = new TrackingLoggingMonitor(LoggerFactory.CreateLogger <TrackingLoggingMonitor>());
            SerializationRegister = new FakeSerializationRegister();
            MiddlewareMap         = new MiddlewareMap();
            CompletionMiddleware  = new AwaitableMiddleware(OutputHelper);

            var testResolver = new InMemoryServiceResolver(OutputHelper, Monitor,
                                                           sc => sc.AddSingleton <IHandlerAsync <SimpleMessage> >(Handler));

            Middleware = new HandlerMiddlewareBuilder(testResolver, testResolver)
                         .Use(CompletionMiddleware)
                         .UseDefaults <SimpleMessage>(typeof(InspectableHandler <SimpleMessage>))
                         .Build();

            Given();
        }