Beispiel #1
0
 public void testExtended2List() {
     List list = Extended2Enum.getEnumList();
     assertNotNull(list);
     assertEquals(3, list.size());
     assertEquals(list.size(), Extended2Enum.getEnumMap().keySet().size());
     
     Iterator it = list.iterator();
     assertSame(Extended2Enum.ALPHA, it.next());
     assertSame(Extended2Enum.BETA, it.next());
     assertSame(Extended2Enum.GAMMA, it.next());
 }
Beispiel #2
0
 public void testExtended2Map() {
     Map map = Extended2Enum.getEnumMap();
     assertNotNull(map);
     assertEquals(map.keySet().size(), Extended2Enum.getEnumList().size());
     
     assertTrue(map.containsValue(Extended2Enum.ALPHA));
     assertTrue(map.containsValue(Extended2Enum.BETA));
     assertTrue(map.containsValue(Extended2Enum.GAMMA));
     assertSame(Extended2Enum.ALPHA, map.get("Alpha"));
     assertSame(Extended2Enum.BETA, map.get("Beta"));
     assertSame(Extended2Enum.GAMMA, map.get("Gamma"));
 }