Пример #1
0
 public void testOf_two() {
   ArrayMap<String, Integer> map = ArrayMap.of("a", 1, "b", 2);
   assertEquals(2, map.size());
   assertEquals("a", map.getKey(0));
   assertEquals((Integer) 1, map.getValue(0));
   assertEquals("b", map.getKey(1));
   assertEquals((Integer) 2, map.getValue(1));
 }
Пример #2
0
 public void testOf_one() {
   ArrayMap<String, Integer> map = ArrayMap.of("a", 1);
   assertEquals(1, map.size());
   assertEquals("a", map.getKey(0));
   assertEquals((Integer) 1, map.getValue(0));
 }