// exception expected @Test public void testPeekFrontEmpty() throws InvalidAccessException, ValueException { DoubleLinkedList dll = new DoubleLinkedList(); try { dll.peekFront(); } catch (InvalidAccessException ex) { return; } fail("ExceptionExpected"); }
// no Exception expected @Test public void testPeekFront() throws InvalidAccessException, ValueException { DoubleLinkedList dll = new DoubleLinkedList(); dll.pushFront(5); dll.pushFront(6); try { assertEquals(6, dll.peekFront()); } catch (InvalidAccessException ex) { fail(ex.getMessage()); } }