Ejemplo n.º 1
0
 /** Moo */
 @Test
 public void testToString() {
   assertEquals("[]", words.toString());
   words.add("5");
   words.add("6");
   words.add("7");
   assertEquals("[5, 6, 7]", words.toString());
 }
Ejemplo n.º 2
0
 /** Moo */
 @Test
 public void testAddLoc() {
   words.add(0, "5");
   System.out.println(words.toString());
   words.add(0, "3");
   System.out.println(words.toString());
   words.add(1, "4");
   System.out.println(words.toString());
   assertSame("3", words.get(0));
   assertSame("4", words.get(1));
   assertSame("5", words.get(2));
   assertEquals(3, words.size());
 }