public void AddToTheQueue21ElementsTest() { ThreadSafeCircularQueue ManagedQueue = new ThreadSafeCircularQueue(20); for (int i = 0; i < 21; i++) { ManagedQueue.Add(i); } for (int i = 1; i < 21; i++) { Assert.AreEqual(i, ManagedQueue.Pick()); } }
public void PickElementFromTheEmptyQueueTest() { ThreadSafeCircularQueue ManagedQueue = new ThreadSafeCircularQueue(20); Assert.AreEqual(null, ManagedQueue.Pick()); }