public DispatcherClient(string hostName,ITalkToServer server, IDeliveryErrorsQueue errors ,BusAuditor auditor)
 {
     server.MustNotBeNull();
     _hostName = hostName;
     _server = server;
     _errors = errors;
     _auditor = auditor;
 }
 public DispatcherClientTests()
 {
     _server = Substitute.For<ITalkToServer>();
     _err = Substitute.For<IDeliveryErrorsQueue>();
     _sut =new DispatcherClient(Setup.TestEndpoint.Host,_server,_err,new BusAuditor(new InMemoryAuditStorage()));
     _config = SetupFakeConfig();
     _sut.SubscribeToServer(new []{_config});
 }
 public DispatcherClient(string hostName, ITalkToServer server, IDeliveryErrorsQueue errors, BusAuditor auditor)
 {
     server.MustNotBeNull();
     _hostName = hostName;
     _server   = server;
     _errors   = errors;
     _auditor  = auditor;
 }
 public DispatcherClientTests()
 {
     _server = Substitute.For <ITalkToServer>();
     _err    = Substitute.For <IDeliveryErrorsQueue>();
     _sut    = new DispatcherClient(Setup.TestEndpoint.Host, _server, _err, new BusAuditor(new InMemoryAuditStorage()));
     _config = SetupFakeConfig();
     _sut.SubscribeToServer(new [] { _config });
 }
Beispiel #5
0
        public ServerTests()
        {
            _err = Substitute.For<IDeliveryErrorsQueue>();
            _transporter = Substitute.For<IDeliverToEndpoint>();
            _sut =new DispatcherServer(c =>
            {
                c.DeliveryErrorsQueue = _err;
                c.Storage = Substitute.For<IStoreDispatcherServerState>();
                c.Transporters.Add(Setup.TestEndpoint,_transporter);
                c.EndpointUpdatesNotifier = Substitute.For<IGetEndpointUpdates>();
                c.MessageNotifier = Substitute.For<IGetMessages>();
            });

            _sut.ReceiveConfigurations(new [] {SetupConfig()});
            _sut.Start();
        }
Beispiel #6
0
        public ServerTests()
        {
            _err         = Substitute.For <IDeliveryErrorsQueue>();
            _transporter = Substitute.For <IDeliverToEndpoint>();
            _sut         = new DispatcherServer(c =>
            {
                c.DeliveryErrorsQueue = _err;
                c.Storage             = Substitute.For <IStoreDispatcherServerState>();
                c.Transporters.Add(Setup.TestEndpoint, _transporter);
                c.EndpointUpdatesNotifier = Substitute.For <IGetEndpointUpdates>();
                c.MessageNotifier         = Substitute.For <IGetMessages>();
            });

            _sut.ReceiveConfigurations(new [] { SetupConfig() });
            _sut.Start();
        }
Beispiel #7
0
 IConfigureHost IConfigureHost.SendFailedDeliveriesTo(IDeliveryErrorsQueue queue)
 {
     queue.MustNotBeNull();
     _storages[typeof(IDeliveryErrorsQueue)] = queue;
     return(this);
 }
Beispiel #8
0
 public DispatcherClient BuildClient(string host, IDeliveryErrorsQueue errors, BusAuditor auditor)
 => new DispatcherClient(host, Communicator, errors, auditor);
 public DispatcherClient BuildClient(string host,IDeliveryErrorsQueue errors,BusAuditor auditor) 
     => new DispatcherClient(host,Communicator,errors,auditor);