コード例 #1
0
        [Test] public void NewCachedThreadPoolByFactoryCanExecuteRunnables()
        {
            var e = Executors.NewCachedThreadPool(new SimpleThreadFactory());

            CanExecuteRunnable(e);
            JoinPool(e);
        }
コード例 #2
0
        [Test] public void NewCachedThreadPoolChokesOnNullFactory()
        {
            var e = Assert.Throws <ArgumentNullException>(
                () => Executors.NewCachedThreadPool(null));

            Assert.That(e.ParamName, Is.EqualTo("threadFactory"));
        }
コード例 #3
0
        [Test] public void NewCachedThreadPoolCanExecuteRunnables()
        {
            var e = Executors.NewCachedThreadPool();

            CanExecuteRunnable(e);
            JoinPool(e);
        }