private void testIsEmpty(BasicQueue <DSInteger> the_queue) { //simple isEmpty() check with items and without Assert.AreEqual(false, the_queue.isEmpty()); the_queue.clear(); Assert.AreEqual(true, the_queue.isEmpty()); }
private void testSize(BasicQueue <DSInteger> the_queue) { Assert.AreEqual(5, the_queue.size()); the_queue.dequeue(); Assert.AreEqual(4, the_queue.size()); the_queue.clear(); Assert.AreEqual(0, the_queue.size()); }
private void testClear(BasicQueue <DSInteger> the_queue) { //make sure there are items Assert.AreEqual(false, the_queue.isEmpty()); //make sure they are cleared the_queue.clear(); Assert.AreEqual(true, the_queue.isEmpty()); Assert.AreEqual(null, the_queue.dequeue()); }