public void CountAliveThreadAfterShutDown()
        {
            var numberThreads = 10;

            threadPool = new MyThreadPool.ThreadPool(numberThreads);
            threadPool.Shutdown();
            Assert.AreEqual(0, threadPool.CountAliveThread());
        }
        public void CountAliveThreadBeforeShutDown()
        {
            var numberThreads = 4;

            threadPool = new MyThreadPool.ThreadPool(numberThreads);
            Thread.Sleep(3000);
            var realCount = threadPool.CountAliveThread();

            Assert.AreEqual(numberThreads, realCount);
        }
        public void ConstructorOfThreadPoolCompletedBeforeAddTask()
        {
            var numberThreads = 100;

            threadPool = new MyThreadPool.ThreadPool(numberThreads);
            Thread.Sleep(200);
            var temp = threadPool.AddTask(() => 5);

            Assert.AreEqual(numberThreads, threadPool.CountAliveThread());
        }