public void Pop(int[] data) { var countData = 0; var queue = new Algorithms.Queues.LinkedQueue <int>(); foreach (var item in data) { queue.Enqueue(item); countData++; } var maxSize = queue.Tamanho; List <int> returns = new List <int>(); for (int i = 0; i < countData; i++) { returns.Add(queue.Dequeue()); } Assert.AreEqual(maxSize, data.Length); Assert.AreEqual(0, queue.Tamanho); CollectionAssert.AreEqual(returns.ToArray(), data); }
public void Pop_Empty() { var queue = new Algorithms.Queues.LinkedQueue <int>(); queue.Dequeue(); }