void Invoke(LogicalMessage message) { var context = new SendLogicalMessageContext(null, new SendOptions(), message); sendBehavior.Invoke(context, () => { }); }
public void Should_not_blow_up() { var metadata = new MessageMetadata { TimeToBeReceived = TimeSpan.FromDays(1) }; var message = new LogicalMessage(metadata, new MessageWithNullDataBusProperty(), new Dictionary<string, string>(), null); var context = new SendLogicalMessageContext(null,new SendOptions(), message); using (var stream = new MemoryStream()) { new BinaryFormatter().Serialize(stream, "test"); stream.Position = 0; sendBehavior.Invoke(context, () => { }); } }