public void Should_handle_be_able_to_read_stored_values() { const string content = "Test"; var key = Put(content, TimeSpan.MaxValue); using (var stream = dataBus.Get(key)) { Assert.AreEqual(new StreamReader(stream).ReadToEnd(), content); } }
public void Should_transmit_the_databus_payload_on_the_same_channel_as_the_message() { var testString = "A laaarge string"; var message = new MessageWithADataBusProperty { LargeString = new DataBusProperty<string>(testString) }; SendMessageToGatewayQueue(message); var propertyKey = message.LargeString.Key; var transportMessage = GetResultingMessage(); string dataBusKey = null; transportMessage.Headers.TryGetValue("NServiceBus.DataBus." + propertyKey, out dataBusKey); //make sure that we got the key Assert.NotNull(dataBusKey); //make sure that they key exist in our databus var dataBusForTheReceivingSide = new FileShareDataBus("../../../databus.storage"); Assert.NotNull(dataBusForTheReceivingSide.Get(dataBusKey)); }
public void Should_transmit_the_databus_payload_on_the_same_channel_as_the_message() { var testString = "A laaarge string"; var message = new MessageWithADataBusProperty { LargeString = new DataBusProperty <string>(testString) }; SendMessageToGatewayQueue(message); var propertyKey = message.LargeString.Key; var transportMessage = GetResultingMessage(); string dataBusKey = null; transportMessage.Headers.TryGetValue("NServiceBus.DataBus." + propertyKey, out dataBusKey); //make sure that we got the key Assert.NotNull(dataBusKey); //make sure that they key exist in our databus var dataBusForTheReceivingSide = new FileShareDataBus("../../../databus.storage"); Assert.NotNull(dataBusForTheReceivingSide.Get(dataBusKey)); }