public void pop_single_entry() { LoggerQueue queue = new LoggerQueue(1); queue.add("test"); Assert.IsTrue(queue.isFull()); Console.WriteLine(queue.pop()); Assert.IsTrue(queue.isEmpty()); }
public void pop_multiple_entries() { LoggerQueue queue = new LoggerQueue(20); int add = 0; while (add < 10) { queue.add(String.Format("Test {0}", ++add)); } int pop = 0; while (pop < 10) { Assert.AreEqual(queue.pop(), String.Format("Test {0}", ++pop)); } }