@Test public void toString_() { MyServiceImpl bean = new MyServiceImpl(); // with beanName, simple assertEquals("myFavoriteService:MyService", myService.toString()); assertEquals("myFavoriteService:MyService", myService.getBeanDescription()); assertEquals("myFavoriteService:MyService", myService.getBeanDescription(true)); // with beanName, long assertEquals( "myFavoriteService:" + MyService.class.getName(), myService.getBeanDescription(false)); // no beanName, simple assertEquals("MyService", bean.toString()); assertEquals("MyService", bean.getBeanDescription()); assertEquals("MyService", bean.getBeanDescription(true)); // no beanName, long assertEquals(MyService.class.getName(), bean.getBeanDescription(false)); // inner bean bean.setBeanName("(inner bean)111"); assertEquals("MyService", bean.toString()); assertEquals("MyService", bean.getBeanDescription()); assertEquals("MyService", bean.getBeanDescription(true)); }
@Test public void getBeanName() { assertEquals("myFavoriteService", myService.getBeanName()); }
@Test public void assertInitialized() { myService.assertInitialized(); assertTrue(myService.isInitialized()); }
@Test public void getBeanInterface() { assertEquals(MyService.class, myService.getBeanInterface()); }