public void RabbitMQBinding_DeliveryMessageInAllSupportedFromats_ReceiveInSingleChannel() { IOneWayService textChannel = _channelFactory.CreateChannel(); IOneWayService mtomChannel = _mtomFactory.CreateChannel(); IOneWayService binaryChannel = _binaryFactory.CreateChannel(); Blob data = new Blob { Id = 1, Data = new byte[1024] }; int receiveCounter = 0; A.CallTo(_errorProcessorFake).DoesNothing(); A.CallTo(() => _processorFake.LargeData(A<Blob>.Ignored)).Invokes(() => receiveCounter++); A.CallTo(() => _processorFake.Say(A<Data>.Ignored)).Invokes(() => _ev.Set()); textChannel.LargeData(data); mtomChannel.LargeData(data); binaryChannel.LargeData(data); textChannel.Say(new Data()); bool wait = _ev.Wait(TimeSpan.FromSeconds(10)); receiveCounter.Should().Be(3); wait.Should().BeTrue("Service were not being invoked"); }
public void RabbitMQBinding_TransferLargeBinary_TextBaseSerialization() { IOneWayService channel = _channelFactory.CreateChannel(); Blob data = new Blob { Id = 1, Data = new byte[8 * 1024 * 1024] // 8MB }; A.CallTo(_errorProcessorFake).DoesNothing(); A.CallTo(() => _processorFake.LargeData(A<Blob>.Ignored)).Invokes(() => _ev.Set()); channel.LargeData(data); bool wait = _ev.Wait(TimeSpan.FromSeconds(10)); wait.Should().BeTrue(); A.CallTo(() => _processorFake.LargeData(A<Blob>._)).MustHaveHappened(Repeated.Like(i => i == 1)); }
public void LargeData(Blob data) { _errorProcessor.LargeData(data); _processor.LargeData(data); }