BAEL 148 move to this repo (#2885)

This commit is contained in:
dimitarsazdovski
2017-10-27 23:45:27 +02:00
committed by Zeger Hendrikse
parent 303db6c663
commit fb283f35c7
9 changed files with 255 additions and 0 deletions

View File

@@ -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());
}
}