コード例 #1
0
        public void StartMessageProcessors_NoHandlers_ShouldStopWithoutWaitingForCancellation()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .StartMessageProcessors()
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsTrue(isStopped));
        }
コード例 #2
0
        public void StartMessageProcessors_SingleHandlerWithoutException_ShouldStopWhenCancelled()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .AddProcessor()
            .StartMessageProcessors(5)
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsTrue(isStopped));
        }
コード例 #3
0
        public void StartMessageProcessors_SingleHandlerWithException_ShouldStopWithoutCancellation()
        {
            var fixtures = new ProgramTestFixtures();

            fixtures
            .AddProcessor()
            .WithExcetionDuringProcessing()
            .StartMessageProcessors()
            .WaitForMessageProcessorsToStop(ProgramTestFixtures.MaxTimeBeforeAbandonTest, isStopped => Assert.IsFalse(isStopped));
        }
コード例 #4
0
        public void StartMessageProcessors_MultipleHandlersOneWithException_ShouldRunForever()
        {
            var fixtures = new ProgramTestFixtures();

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