예제 #1
0
 @Test(timeout = 500)
 public void testList3() {
   assertTrue("Newly constructed list should be empty", impl.isEmpty());
   assertEquals("Newly constructed list should have size 0", 0, impl.size());
   assertEquals("Appending the list should return itself.", impl, impl.append(5));
   assertEquals("Size should now be 1.", 1, impl.size());
 }
예제 #2
0
 @Test(timeout = 500)
 public void testList5() {
   assertEquals("Newly constructed list should have size 0", 0, impl.size());
   assertEquals("Appending the list should return itself.", impl, impl.append(5));
   assertEquals("Size should now be 1.", 1, impl.size());
   impl.append(6).append(7).append(8);
   assertEquals("Size should now be 4.", 4, impl.size());
   assertEquals("First element should be 5.", new Integer(5), impl.get(0));
 }
예제 #3
0
 @Test(timeout = 500)
 public void testListUnbounded() {
   for (int i = 0; i < 500000; i++) {
     assertEquals(i, impl.size());
     impl.append(i);
   }
 }
예제 #4
0
 @Test(timeout = 500)
 public void testList1() {
   assertTrue("Newly constructed list should be empty", impl.isEmpty());
   assertEquals("Newly constructed list should have size 0", 0, impl.size());
 }