1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package examples;
18
19 import junit.framework.TestCase;
20
21 import org.springframework.context.ApplicationContext;
22 import org.springframework.context.support.ClassPathXmlApplicationContext;
23 import org.yaml.snakeyaml.Yaml;
24
25 public class SpringTest extends TestCase {
26 public void testSimple() {
27 ApplicationContext context = new ClassPathXmlApplicationContext("examples/spring.xml");
28 Yaml yaml = (Yaml) context.getBean("standardYaml");
29 assertNotNull(yaml);
30
31 yaml = (Yaml) context.getBean("javabeanYaml");
32 assertNotNull(yaml);
33
34 yaml = (Yaml) context.getBean("snakeYaml");
35 assertNotNull(yaml);
36 }
37 }