public void setup()
        {
            _dispatcher = Substitute.For<IDispatch<object>>();

            _queue = Substitute.For<IWorkQueue<object>>();
            _subject = new ThreadedWorkerPool<object>("name", 4);
            _subject.SetSource(_dispatcher, _queue);
        }
 public void default_number_of_threads_is_equal_to_logical_processor_count()
 {
     var withDefaults = new ThreadedWorkerPool<object>("name");
     Assert.That(withDefaults.PoolSize(), Is.EqualTo(Environment.ProcessorCount));
 }