public void Dispose_IsIdempotent()
 {
     using (var thread = new DedicatedAsynchronousProcessingThread(_defaultTimeSpan))
     {
         thread.Dispose();
         thread.Dispose();
     }
 }
        public void Start_ThrowsForDisposesObject()
        {
            var thread = new DedicatedAsynchronousProcessingThread(_defaultTimeSpan);

            thread.Dispose();
            Assert.Throws <ObjectDisposedException>(() => thread.Start());
        }
        public void Push_ThrowsForDisposesObject()
        {
            var thread = new DedicatedAsynchronousProcessingThread(_defaultTimeSpan);

            thread.Start();
            thread.Dispose();

            Assert.Throws <ObjectDisposedException>(() => thread.Enqueue(() => Task.CompletedTask));
        }