111112113114115116117118119120121122
} @Test public void testGetBeanRef() { di = new TamaCatDIContainer("test.xml", loader); SampleCore core = di.getBean("Core3", SampleCore.class); assertNotNull(core); //assertTrue(core instanceof Core); assertEquals("CoreName", core.getCoreName()); assertNotNull(core.getCore()); }
148149150151152153154155
@Test public void testInvoke() { Class<?> type = SampleCore.class; Method method = ClassUtils.getMethod(type, "setCore", Core.class); ClassUtils.invoke(method, new SampleCore(), ""); ClassUtils.invoke(method, new SampleCore(), (Object) null); }
} @Test public void testGetBeanRef() { di = new TamaCatDIContainer(XML, loader); SampleCore core = (SampleCore) di.getBean("Core3"); assertNotNull(core); //assertTrue(core instanceof Core); assertEquals("CoreName", core.getCoreName()); assertNotNull(core.getCore()); }