public void Setup()
        {
            _connection = MockRepository.GenerateMock<IConnection>();
            _channel = MockRepository.GenerateMock<IModel>();
            _basicConsumer = MockRepository.GenerateStub<QueueingBasicConsumer>();

            _consumerWrapper = new QueueingBasicConsumerWrapper(_basicConsumer, _connection, _channel);
        }
Ejemplo n.º 2
0
 protected void CreateConsumerMock(CorrelationIdState correlationIdState, string routingKey)
 {
     Consumer = MockRepository.GenerateStub<QueueingBasicConsumer>();
     ConsumerWrapper = MockRepository.GenerateStub<QueueingBasicConsumerWrapper>(Consumer, Connection, Model);
     ConsumerWrapper.Stub(x => x.GetConsumer())
         .Return(Consumer);
     SetupBasicProperties(correlationIdState);
     ConsumerWrapper.Stub(x => x.Dequeue())
         .Return(new BasicDeliverEventArgs("", 0, false, "ex1", routingKey, BasicProperties, MessageData));
 }