2728293031323334
} public void testSubmodule() { TypedRegistry registry = constructRegistry(Supermodule.class); StringHolder service = registry.getService("super.sub.StringHolder", StringHolder.class); assertNotNull(service); }
117118119120121122123124125126127
List dest = new ArrayList(); p.process(dest, elements, m); assertEquals(1, dest.size()); StringHolder h = (StringHolder) dest.get(0); assertEquals("flintstone", h.getValue()); verifyControls(); }
181182183184185186187188189190191
259260261262263264265266267268269
List dest = new ArrayList(); p.process(dest, elements, m); assertEquals(1, dest.size()); StringHolder h = (StringHolder) dest.get(0); assertEquals("wilma", h.getValue()); verifyControls(); }
377378379380381382383384385386387388
Map dest = new HashMap(); p.process(dest, elements, m); assertEquals(1, dest.size()); StringHolder h = (StringHolder) dest.get(flintstoneKey); assertNotNull(h); assertEquals("fred", h.getValue()); verifyControls(); }
3940414243444546474849
RegistryInfrastructure r = (RegistryInfrastructure) rc.getMock(); ModuleImpl m = new ModuleImpl(); m.setRegistry(r); StringHolder h = new StringHolderImpl(); r.getService(StringHolder.class, m); rc.setReturnValue(h); replayControls();
93949596979899100101102103
p.process(elements, m); List l = p.getElements(); assertEquals(1, l.size()); StringHolder h = (StringHolder) l.get(0); assertEquals("flintstone", h.getValue()); verifyControls(); }
144145146147148149150151152153154
203204205206207208209210211212213
p.process(elements, m); List l = p.getElements(); assertEquals(1, l.size()); StringHolder h = (StringHolder) l.get(0); assertEquals("wilma", h.getValue()); verifyControls(); }
310311312313314315316317318319320
p.process(elements, m); Map map = p.getMappedElements(); assertEquals(1, map.size()); StringHolder h = (StringHolder) map.get(flintstoneKey); assertEquals("fred", h.getValue()); verifyControls(); }