Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
 object MutateIncoming(object message)
 {
     return(mutateIncomingMessages.MutateIncoming(message));
 }