Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. Assert.assertArrayEquals(new Integer[] { 3, 2, 1 }, lista1.toArray());
  2. Assert.assertArrayEquals(new Integer[] {}, lista2.toArray());
  3.  
  4. Assert.assertArrayEquals(new Integer[] { 5, 4, 3, 2, 1 }, lista3.toArray());
  5. lista3.remove(3);
  6. lista3.remove(4);
  7. Assert.assertArrayEquals(new Integer[] { 5, 2, 1 }, lista3.toArray());
  8. lista3.insert(0);
  9. Assert.assertArrayEquals(new Integer[] { 5, 2, 1, 0 }, lista3.toArray());
  10. lista3.removeFirst();
  11. lista3.removeLast();
  12. Assert.assertArrayEquals(new Integer[] { 2, 1 }, lista3.toArray());
  13. lista3.removeFirst();
  14. lista3.removeFirst();
  15. Assert.assertArrayEquals(new Integer[] { }, lista3.toArray());
  16. lista3.insertFirst(3);
  17. lista3.insertFirst(4);
  18. lista3.insert(5);
  19. Assert.assertArrayEquals(new Integer[] { 4, 3, 5 }, lista3.toArray());
  20. lista3.removeLast();
  21. Assert.assertArrayEquals(new Integer[] { 4, 3 }, lista3.toArray());
  22. lista3.removeLast();
  23. Assert.assertArrayEquals(new Integer[] { 4 }, lista3.toArray());
  24. lista3.removeLast();
  25. Assert.assertArrayEquals(new Integer[] { }, lista3.toArray());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement