Ejemplo n.º 1
0
        public void resolves_single_logger_as_just_that_instance()
        {
            var inner = new ConsoleBusLogger();

            BusLogger.Combine(new IBusLogger[] { inner })
            .ShouldBeSameAs(inner);
        }
Ejemplo n.º 2
0
        public HandlerPipeline(IEnvelopeSender sender, IEnvelopeSerializer serializer, HandlerGraph graph, IReplyWatcher replies, IBusLogger[] loggers)
        {
            _sender     = sender;
            _serializer = serializer;
            _graph      = graph;
            _replies    = replies;

            Logger = BusLogger.Combine(loggers);
        }
Ejemplo n.º 3
0
        public void resolves_multiple_loggers_to_composite()
        {
            var inner1 = Substitute.For <IBusLogger>();
            var inner2 = Substitute.For <IBusLogger>();
            var inner3 = Substitute.For <IBusLogger>();

            BusLogger.Combine(new IBusLogger[] { inner1, inner2, inner3 })
            .ShouldBeOfType <CompositeLogger>()
            .Loggers.ShouldHaveTheSameElementsAs(inner1, inner2, inner3);
        }
Ejemplo n.º 4
0
 public void resolves_no_loggers_as_nullo()
 {
     BusLogger.Combine(new IBusLogger[0])
     .ShouldBeOfType <BusLogger>();
 }
Ejemplo n.º 5
0
 public EnvelopeSender(ChannelGraph channels, IEnvelopeSerializer serializer, IBusLogger[] loggers)
 {
     _channels   = channels;
     _serializer = serializer;
     Logger      = BusLogger.Combine(loggers);
 }