Пример #1
0
 @Test
 public void should_format_Map() {
   Map<String, Class<?>> map = new LinkedHashMap<String, Class<?>>();
   map.put("One", String.class);
   map.put("Two", File.class);
   assertEquals("{'One'=java.lang.String, 'Two'=java.io.File}", Maps.format(map));
 }
Пример #2
0
 @Test
 public void should_return_empty_braces_if_Map_is_empty() {
   assertEquals(Maps.format(new HashMap<String, String>()), "{}");
 }
Пример #3
0
 @Test
 public void should_return_null_if_Map_is_null() {
   assertNull(Maps.format(null));
 }