public void SetUp() { exchangeDeclareCount = 0; publishExchangeDeclareStrategy = new PublishExchangeDeclareStrategy(); advancedBus = MockRepository.GenerateStub<IAdvancedBus>(); advancedBus .Stub(x => x.ExchangeDeclare(exchangeName, "topic")) .Return(exchange) .WhenCalled(x => exchangeDeclareCount++); }
public void SetUp() { exchangeDeclareCount = 0; publishExchangeDeclareStrategy = new PublishExchangeDeclareStrategy(); advancedBus = MockRepository.GenerateStub<IAdvancedBus>(); exchange = new Exchange(exchangeName); exchangeTask = TaskHelpers.FromResult(exchange); advancedBus .Stub(x => x.ExchangeDeclareAsync(exchangeName, "topic")) .Return(exchangeTask) .WhenCalled(x => exchangeDeclareCount++); }
public RabbitBus( IConventions conventions, IAdvancedBus advancedBus, IPublishExchangeDeclareStrategy publishExchangeDeclareStrategy, IMessageDeliveryModeStrategy messageDeliveryModeStrategy, IRpc rpc, ISendReceive sendReceive, ConnectionConfiguration connectionConfiguration) { Preconditions.CheckNotNull(conventions, "conventions"); Preconditions.CheckNotNull(advancedBus, "advancedBus"); Preconditions.CheckNotNull(publishExchangeDeclareStrategy, "publishExchangeDeclareStrategy"); Preconditions.CheckNotNull(rpc, "rpc"); Preconditions.CheckNotNull(sendReceive, "sendReceive"); Preconditions.CheckNotNull(connectionConfiguration, "connectionConfiguration"); this.conventions = conventions; this.advancedBus = advancedBus; this.publishExchangeDeclareStrategy = publishExchangeDeclareStrategy; this.messageDeliveryModeStrategy = messageDeliveryModeStrategy; this.rpc = rpc; this.sendReceive = sendReceive; this.connectionConfiguration = connectionConfiguration; }
public TransactionalRpc(ConnectionConfiguration connectionConfiguration, IAdvancedBus advancedBus, IEventBus eventBus, IConventions conventions, IPublishExchangeDeclareStrategy publishExchangeDeclareStrategy, IMessageDeliveryModeStrategy messageDeliveryModeStrategy, ITimeoutStrategy timeoutStrategy, ITypeNameSerializer typeNameSerializer) : base(connectionConfiguration, advancedBus, eventBus, conventions, publishExchangeDeclareStrategy, messageDeliveryModeStrategy, timeoutStrategy, typeNameSerializer) { this.timeoutStrategy = timeoutStrategy; }