@Test public void testClone() throws ValueException { DoubleLinkedList dll = new DoubleLinkedList(); dll.pushBack(6); dll.pushBack(5); DoubleLinkedList dll2 = dll.clone(); assertEquals(true, dll.equals(dll2)); }
@Test public void testEqualsFalse() throws ValueException { DoubleLinkedList dll = new DoubleLinkedList(); dll.pushBack(6); dll.pushBack(5); DoubleLinkedList dll2 = new DoubleLinkedList(); dll2.pushFront(6); dll2.pushFront(5); assertEquals(false, dll.equals(dll2)); }
// no Exception expected @Test public void testEqualsNoException() throws ValueException { DoubleLinkedList dll = new DoubleLinkedList(); dll.pushBack(6); dll.pushBack(5); DoubleLinkedList dll2 = new DoubleLinkedList(); dll2.pushFront(6); dll2.pushFront(5); try { assertEquals(false, dll.equals(dll2)); } catch (NullPointerException ex) { fail("No Exception expected!"); } }