Example #1
0
 @org.junit.Test
 public void testCreateList() throws Exception {
   final UGList<String> list = ug.createList();
   assertTrue("List should be of type SwingList", list instanceof SwingList);
   assertEquals("Length of list at the beginning should be 0", 0, list.size());
   list.add("Foo");
   list.add("Bar");
   assertEquals("Length after two inserts should be 2", 2, list.size());
   assertEquals("Element at 0 should be 'Foo'", "Foo", list.at(0));
   assertEquals("Element at 0 should be 'Bar'", "Bar", list.at(1));
 }