public void getRearTest() { SeqQueue <string> seqQueue = new SeqQueue <string>(10); seqQueue.enter("A"); seqQueue.enter("B"); seqQueue.enter("C"); seqQueue.enter("D"); Assert.AreEqual(seqQueue.getRear(), "D"); }
public void exitTest() { SeqQueue <string> seqQueue = new SeqQueue <string>(10); seqQueue.enter("A"); seqQueue.enter("B"); seqQueue.enter("C"); seqQueue.enter("D"); seqQueue.enter("F"); Assert.AreEqual(seqQueue.exit(), "A"); }
public void clearTest() { SeqQueue <string> seqQueue = new SeqQueue <string>(10); seqQueue.enter("A"); seqQueue.enter("B"); seqQueue.enter("C"); seqQueue.enter("D"); seqQueue.clear(); Assert.AreEqual(seqQueue.isEmpty, true); }
public void enterTest() { SeqQueue <string> seqQueue = new SeqQueue <string>(10); seqQueue.enter("A"); seqQueue.enter("B"); seqQueue.enter("C"); seqQueue.enter("D"); seqQueue.enter("E"); List <string> result = new List <string>() { "A", "B", "C", "D", "E" }; CollectionAssert.AreEqual(seqQueue.display(), result); }