Esempio n. 1
0
        public void there_should_be_a_message_there_first_time_around_and_return_null_second_time()
        {
            var msg = t.Receive();

            msg.ShouldNotBeNull();
            try
            {
                var obj = msg.GetBody <A>();
                obj.ShouldEqual(message, "they should have the same contents");
            }
            finally
            {
                if (msg != null)
                {
                    msg.Complete();
                }
            }

            var msg2 = t.Receive(1000.Milliseconds());

            msg2.ShouldBeNull();
        }