@Test public void testRegisterBean() { IocManager.getManager().registBean(TestService.class); TestService service = IocManager.getManager().getBean(TestService.class); Assert.assertEquals("Hello IOC", service.printHello()); }
@Test public void testNotRegistBean() { OutputService outputService = IocManager.getManager().getBean(OutputServiceImpl.class); Assert.assertNull(outputService); }