160161162163164165166167
// Expect: Y public void test9() { RendererMap map = new RendererMap(); map.put(Y.class, yor); ObjectRenderer r = map.get(B.class); assertEquals(r, yor); }
170171172173174175176177
// Expect: X public void test10() { RendererMap map = new RendererMap(); map.put(X.class, xor); ObjectRenderer r = map.get(B.class); assertEquals(r, xor); }
808182838485868788
// Add: no renderer // Expect: defaultRenderer public void test1() { RendererMap map = new RendererMap(); ObjectRenderer dr = map.getDefaultRenderer(); ObjectRenderer r = map.get(Integer.class); assertEquals(r, dr); }
919293949596979899
// Expect: Integer renderer public void test2() { RendererMap map = new RendererMap(); map.put(Integer.class, ior); ObjectRenderer r = map.get(Integer.class); assertEquals(r, ior); }
102103104105106107108109
// Expect: Number public void test3() { RendererMap map = new RendererMap(); map.put(Number.class, ior); ObjectRenderer r = map.get(Integer.class); assertEquals(r, ior); }
112113114115116117118119
// Result: Object public void test4() { RendererMap map = new RendererMap(); map.put(Object.class, oor); ObjectRenderer r = map.get(Integer.class); assertEquals(r, oor); }
126127128129130131132133
map.put(Object.class, oor); map.put(Number.class, nor); map.put(Integer.class, ior); ObjectRenderer r = map.get(Integer.class); assertEquals(r, ior); }
139140141142143144145146
RendererMap map = new RendererMap(); map.put(Object.class, oor); map.put(Number.class, nor); ObjectRenderer r = map.get(Integer.class); assertEquals(r, nor); }
156157158159160161162163
} catch(Exception ex) { // likely JDK 1.1 return; } map.put(comparable, cor); ObjectRenderer r = map.get(Integer.class); assertEquals(r, cor); }
167168169170171172173174
// Expect: Serializablee public void test8() { RendererMap map = new RendererMap(); map.put(Serializable.class, sor); ObjectRenderer r = map.get(Integer.class); assertEquals(r, sor); }