BAEL 148 move to this repo (#2885)
This commit is contained in:
committed by
Zeger Hendrikse
parent
303db6c663
commit
fb283f35c7
@@ -0,0 +1,24 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
|
||||
public class JavaConfigurationTest {
|
||||
|
||||
@Test
|
||||
public void whenJavaConfig_thenCorrectPerson() {
|
||||
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
|
||||
ctx.register(JavaBeanConfig.class);
|
||||
ctx.refresh();
|
||||
|
||||
JavaPersonBean j = ctx.getBean(JavaPersonBean.class);
|
||||
|
||||
assertEquals("31", j.getAge());
|
||||
assertEquals("green", j.getEyesColor());
|
||||
assertEquals("blond", j.getHairColor());
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user