Ejemplo n.º 1
0
        public void DelayedMessagesShouldBeDeliveredNextFrame()
        {
            var count = 0;

            _bus.Send(new DelayedTestMessage(1));

            foreach (var unused in _bus.All <DelayedTestMessage>())
            {
                count++;
            }

            Assert.AreEqual(0, count);

            _bus.Cleanup();

            count = 0;

            foreach (var message in _bus.All <DelayedTestMessage>())
            {
                Assert.AreEqual(1, message.Value);
                count++;
            }

            Assert.AreEqual(1, count);
        }