Example #1
0
        [Test] public void DoesNotRunRunnableWithShutdownExecutorService()
        {
            _threadPoolExecutor.ShutdownNow();
            _discardOldestPolicy.RejectedExecution(_runnable, _threadPoolExecutor);

            _runnable.AssertWasNotCalled(r => r.Run());
            _threadPoolExecutor.AssertWasNotCalled(e => e.Execute(Arg <Action> .Is.Anything));
            _threadPoolExecutor.AssertWasNotCalled(e => e.Execute(Arg <IRunnable> .Is.Anything));
        }