public void WaitingThreads() { WaitNode node = new WaitNode(); FIFOWaitQueue queue = new FIFOWaitQueue(); Assert.AreEqual(0, queue.WaitingThreads.Count); Assert.IsFalse(queue.IsWaiting(Thread.CurrentThread)); queue.Enqueue(node); Assert.AreEqual(1, queue.WaitingThreads.Count); Assert.IsTrue(queue.IsWaiting(Thread.CurrentThread)); }
public void IsWaitingWithNullThread() { FIFOWaitQueue queue = new FIFOWaitQueue(); Assert.IsFalse(queue.IsWaiting(null)); }