Exemplo n.º 1
0
        protected void with(Action <JasperBusRegistry> configuration)
        {
            var registry = new JasperBusRegistry();


            configuration(registry);

            with(registry);
        }
Exemplo n.º 2
0
        protected void with(JasperBusRegistry registry)
        {
            registry.Services.Scan(_ =>
            {
                _.TheCallingAssembly();
                _.WithDefaultConventions();
            });

            Runtime = JasperRuntime.For(registry);


            Graph = Runtime.Container.GetInstance <HandlerGraph>();
        }
Exemplo n.º 3
0
        public override void SetUp()
        {
            _registry = new JasperBusRegistry();

            _registry.Services.AddService <ITransport, StubTransport>();
            _registry.Services.ForConcreteType <MessageTracker>().Configure.Singleton();

            _registry.Services.ForConcreteType <MessageHistory>().Configure.Singleton();
            _registry.Services.AddService <IBusLogger, MessageTrackingLogger>();

            _registry.Services.For <LightningQueueSettings>().Use(new LightningQueueSettings
            {
                MaxDatabases = 20
            });

            _registry.Logging.LogBusEventsWith(new StorytellerBusLogger(Context));
        }
Exemplo n.º 4
0
        public override void SetUp()
        {
            _transport = new StubTransport();
            _tracker   = new AttemptTracker();

            var registry = new JasperBusRegistry();

            registry.ListenForMessagesFrom("stub://1".ToUri());
            registry.Services.AddService <ITransport>(_transport);
            registry.Services.AddService(_tracker);
            registry.SendMessage <ErrorCausingMessage>()
            .To("stub://1".ToUri());

            _runtime = JasperRuntime.For(registry);

            _graph = _runtime.Container.GetInstance <HandlerGraph>();
            _chain = _graph.ChainFor <ErrorCausingMessage>();


            _bus = _runtime.Container.GetInstance <IServiceBus>();
        }
Exemplo n.º 5
0
        public override void SetUp()
        {
            _registry = new JasperBusRegistry();

            _registry.Services.ForConcreteType <MessageTracker>().Configure.Singleton();
        }