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 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 ClientToServerTests() { _disp = Substitute.For <IConfigureDispatcher>(); _disp.TalkUsing(Arg.Do <ITalkToServer>(v => _clientToServer = v)); _disp.CommunicateBySqlStorage(Setup.GetConnection(), ifExists: TableExistsAction.DropIt); _cfg = new DispatchServerConfiguration(); _cfg.ReceiveFromClientsBySql(Setup.GetConnection()); _serverConfig = Substitute.For <IWantEndpointUpdates>(); _serverRoute = Substitute.For <IRouteMessages>(); _cfg.Storage = Substitute.For <IStoreDispatcherServerState>(); _cfg.DeliveryErrorsQueue = Substitute.For <IDeliveryErrorsQueue>(); _cfg.EndpointUpdatesNotifier.Subscribe(_serverConfig); _cfg.MessageNotifier.Subscribe(_serverRoute); }
public ClientToServerTests() { _disp = Substitute.For<IConfigureDispatcher>(); _disp.TalkUsing(Arg.Do<ITalkToServer>(v => _clientToServer = v)); _disp.CommunicateBySqlStorage(Setup.GetConnection(), ifExists: TableExistsAction.DropIt); _cfg = new DispatchServerConfiguration(); _cfg.ReceiveFromClientsBySql(Setup.GetConnection()); _serverConfig = Substitute.For<IWantEndpointUpdates>(); _serverRoute = Substitute.For<IRouteMessages>(); _cfg.Storage = Substitute.For<IStoreDispatcherServerState>(); _cfg.DeliveryErrorsQueue = Substitute.For<IDeliveryErrorsQueue>(); _cfg.EndpointUpdatesNotifier.Subscribe(_serverConfig); _cfg.MessageNotifier.Subscribe(_serverRoute); }
public IConfigureDispatcher TalkUsing(ITalkToServer communicator) { communicator.MustNotBeNull(); Communicator = communicator; return(this); }
public IConfigureDispatcher TalkUsing(ITalkToServer communicator) { communicator.MustNotBeNull(); Communicator = communicator; return this; }