public void stoped_not_starting_server()
        {
            //GIVEN
            var controller = new SleepTestController1();
            var mainQueue  = new QueuedHandler(controller, "Main Queue", 1000);

            //WHEN
            mainQueue.Stop();
        }
        public void throw_exception_on_timeout()
        {
            //GIVEN
            var controller = new SleepTestController1();
            var mainQueue  = new QueuedHandler(controller, "Main Queue", 1000);

            mainQueue.Start();
            mainQueue.Enqueue(new QueuedTestMessage1());

            //WHEN
            Assert.AreEqual(false, controller.MessageHandled());
            mainQueue.Stop();
        }
        public void multiple_stoped()
        {
            //GIVEN
            var controller = new SleepTestController1();
            var mainQueue  = new QueuedHandler(controller, "Main Queue", 1000);

            mainQueue.Start();
            mainQueue.Enqueue(new QueuedTestMessage1());
            controller.MessageHandled();
            try
            {
                mainQueue.Stop();
            }
            catch (InvalidOperationException) { }

            //WHEN
            mainQueue.Stop();
        }