protected override void ConfigureLocalBus(IServiceBusConfigurator configurator) { var mock = MockRepository.GenerateStub <IWorkerSelectionStrategy <FirstCommand> >(); mock.Stub(x => x.GetAvailableWorkers(null, null, false)) .IgnoreArguments() .Return(new List <WorkerDetails> { new WorkerDetails { ControlUri = _nodes["A"].AppendToPath("_control"), DataUri = _nodes["A"], InProgress = 0, InProgressLimit = 100, LastUpdate = DateTime.UtcNow } }); configurator.UseDistributorFor(EndpointFactory, mock); }
protected override void ConfigureLocalBus(IServiceBusConfigurator configurator) { var mock = MockRepository.GenerateStub<IWorkerSelectionStrategy<FirstCommand>>(); mock.Stub(x => x.GetAvailableWorkers(null, null, false)) .IgnoreArguments() .Return(new List<WorkerDetails> { new WorkerDetails { ControlUri = _nodes["A"].AppendToPath("_control"), DataUri = _nodes["A"], InProgress = 0, InProgressLimit = 100, LastUpdate = DateTime.UtcNow } }); configurator.UseDistributorFor(EndpointFactory, mock); }
protected override void ConfigureLocalBus(IServiceBusConfigurator configurator) { configurator.UseDistributorFor <FirstCommand>(EndpointFactory); }