@ -77,6 +79,7 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@@ -77,6 +79,7 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@ -100,6 +103,10 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@@ -100,6 +103,10 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@ -130,24 +137,25 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@@ -130,24 +137,25 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
@Test
publicfinalvoidverifyApplicationContextSet(){
assertNotNull("The application context should have been set due to ApplicationContextAware semantics.",
this.applicationContext);
this.applicationContext);
}
@Test
publicfinalvoidverifyBeanInitialized(){
assertTrue("This test bean should have been initialized due to InitializingBean semantics.",
this.beanInitialized);
this.beanInitialized);
}
@Test
publicfinalvoidverifyBeanNameSet(){
assertEquals("The bean name of this test instance should have been set due to BeanNameAware semantics.",
getClass().getName(),this.beanName);
getClass().getName(),this.beanName);
}
@Test
publicfinalvoidverifyAnnotationAutowiredFields(){
assertNull("The nonrequiredLong field should NOT have been autowired.",this.nonrequiredLong);
assertEquals("The quux field should have been autowired via @Autowired and @Qualifier.","Quux",this.quux);
assertNotNull("The pet field should have been autowired.",this.pet);