Exemplo n.º 1
0
 @Test
 public void testAddSingle() {
   Tuple tuple = new Tuple();
   Single single = new Single("single", 4711);
   tuple.addSingle(single);
   assertEquals(1, tuple.getSingleList().size());
   assertEquals(single, tuple.getSingleAt(0));
   assertEquals("(no name): (single = 4711) ", tuple.toString());
 }
Exemplo n.º 2
0
 @Test
 public void testSetters() {
   Tuple tuple = new Tuple();
   tuple.setName("name");
   assertEquals("name", tuple.getName());
   List<Single> initList = new ArrayList<Single>();
   Single single = new Single("single", 4711);
   initList.add(single);
   tuple.setSingleList(initList);
   assertEquals(initList, tuple.getSingleList());
   assertEquals(single, tuple.getSingleAt(0));
   assertEquals("name: (single = 4711) ", tuple.toString());
 }