@Test public void testFull() { stack.push("Papir"); stack.push("Prut"); stack.push("Hej"); assertTrue(stack.peek().equals("Hej")); }
@Test public void testIsClear() { assertTrue((stack.peek().equals("Hest"))); stack.clear(); assertTrue(stack.isEmpty()); assertTrue(stack.peek() == null); }
@Before public void setUp() { stack = new ListStack<>(); stack.push("Mark"); stack.push("Nick"); stack.push("Hest"); }
@Test public void testIsEmptry() { assertFalse(stack.isEmpty()); stack.pop(); stack.pop(); stack.pop(); assertTrue(stack.isEmpty()); }
@Test public void testPop() { assertTrue((stack.peek().equals("Hest"))); stack.pop(); assertTrue((stack.peek().equals("Nick"))); }
@Test public void testTop() { assertTrue((stack.peek().equals("Hest"))); }