public void Should_pickup_future_timeout_messages_and_send_when_expired() { expected = 1; manager.PushTimeout(CreateData(DateTime.UtcNow.AddSeconds(2))); StartAndStopReceiver(5); WaitForMessagesThenAssert(5); }
public void Should_dispatch_timeout_if_is_due_now() { var messageSender = new FakeMessageSender(); var configure = new BusConfiguration().BuildConfiguration(); configure.localAddress = new Address("sdad", "asda"); var manager = new DefaultTimeoutManager { MessageSender = messageSender, Configure = configure }; manager.PushTimeout(new TimeoutData { Time = DateTime.UtcNow, }); Assert.AreEqual(1, messageSender.MessagesSent); }