public void can_timeout_waiting_for_message_of_type() { using (var tq = new TestQueue(_dispatcher, new[] { typeof(Event), typeof(Command) })) { // Don't publish anything Assert.Throws <TimeoutException>(() => tq.WaitFor <TestEvent>(TimeSpan.FromMilliseconds(100))); tq.AssertEmpty(); } }