public void DurableMessage() { var message = new DurableOutboundMessage <Bar>(new Bar()); var properties = message.BuildBasicProperties(StubResolver <Bar>(null).Object, StubDateTimeProvider().Object, new Mock <INewId>().Object); Assert.True(properties.Persistent); }
public void MessageExpiration() { var expiresAfter = new TimeSpan?(TimeSpan.FromSeconds(18)); var message = new DurableOutboundMessage <Bar>(new Bar()); var properties = message.BuildBasicProperties(StubResolver <Bar>(expiresAfter).Object, StubDateTimeProvider().Object, new Mock <INewId>().Object); Assert.Equal("18000", properties.Expiration); }