public void Outgoing_databus_properties_should_be_dehydrated() { var message = new MessageWithDataBusProperty { DataBusProperty = new DataBusProperty<string>("test") }; outgoingMutator.MutateOutgoing(message); dataBus.AssertWasCalled( x => x.Put(Arg<Stream>.Is.Anything, Arg<TimeSpan>.Is.Equal(TimeSpan.MaxValue))); }
public void Outgoing_databus_properties_should_be_dehydrated() { var message = new MessageWithDataBusProperty { DataBusProperty = new DataBusProperty <string>("test") }; outgoingMutator.MutateOutgoing(message); dataBus.AssertWasCalled( x => x.Put(Arg <Stream> .Is.Anything, Arg <TimeSpan> .Is.Equal(TimeSpan.MaxValue))); }
public void Incoming_databus_properties_should_be_hydrated() { var message = new MessageWithDataBusProperty { DataBusProperty = new DataBusProperty <string>("not used in this test") }; using (var stream = new MemoryStream()) { new BinaryFormatter().Serialize(stream, "test"); stream.Position = 0; dataBus.Stub(s => s.Get(message.DataBusProperty.Key)).Return(stream); message = (MessageWithDataBusProperty)mutator.MutateIncoming(message); } Assert.AreEqual(message.DataBusProperty.Value, "test"); }
public void Incoming_databus_properties_should_be_hydrated() { var message = new MessageWithDataBusProperty { DataBusProperty = new DataBusProperty<string>("not used in this test") }; using (var stream = new MemoryStream()) { new BinaryFormatter().Serialize(stream, "test"); stream.Position = 0; dataBus.Stub(s => s.Get(message.DataBusProperty.Key)).Return(stream); message = (MessageWithDataBusProperty)mutator.MutateIncoming(message); } Assert.AreEqual(message.DataBusProperty.Value, "test"); }