public void StartMessageProcessors_NoHandlers_ShouldStopWithoutWaitingForCancellation()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .StartMessageProcessors()
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsTrue(isStopped));
        }
        public void StartMessageProcessors_SingleHandlerWithoutException_ShouldStopWhenCancelled()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .AddProcessor()
            .StartMessageProcessors(5)
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsTrue(isStopped));
        }
        public void StartMessageProcessors_SingleHandlerWithException_ShouldStopWithoutCancellation()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .AddProcessor()
            .WithExcetionDuringProcessing()
            .StartMessageProcessors()
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsFalse(isStopped));
        }
        public void StartMessageProcessors_MultipleHandlersOneWithException_ShouldRunForever()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .AddProcessor()
            .AddProcessor()
            .AddProcessor()
            .WithExcetionDuringProcessing()
            .StartMessageProcessors()
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsFalse(isStopped));
        }