public void ShouldEnqueueElement() { Data.Structures.Queue <int> queue = new Data.Structures.Queue <int>(); Assert.IsTrue(queue.IsEmpty); int element = 1; queue.Enqueue(element); Assert.AreEqual(1, queue.Count); }
public void ShouldDequeue() { Data.Structures.Queue <int> queue = new Data.Structures.Queue <int>(); int element = 1; queue.Enqueue(element); int removed = queue.Dequeue(); Assert.IsTrue(queue.IsEmpty); Assert.AreEqual(element, removed); }