예제 #1
0
        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());
            }
        }
예제 #2
0
        public void PickElementFromTheEmptyQueueTest()
        {
            ThreadSafeCircularQueue ManagedQueue = new ThreadSafeCircularQueue(20);

            Assert.AreEqual(null, ManagedQueue.Pick());
        }