|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| package org.jconfig.parser; |
|
8 |
| |
|
9 |
| import junit.framework.TestCase; |
|
10 |
| |
|
11 |
| import org.jconfig.Configuration; |
|
12 |
| import org.jconfig.ConfigurationManager; |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| public class AdvancedConfigParserTest extends TestCase { |
|
23 |
| |
|
24 |
0
| public AdvancedConfigParserTest(String arg0) {
|
|
25 |
0
| super(arg0);
|
|
26 |
| } |
|
27 |
| |
|
28 |
0
| public static void main(String[] args) {
|
|
29 |
0
| junit.textui.TestRunner.run(AdvancedConfigParserTest.class);
|
|
30 |
| } |
|
31 |
| |
|
32 |
0
| public void testParseAdvancedConfig() {
|
|
33 |
0
| System.setProperty("jconfig.parser","org.jconfig.parser.AdvancedConfigParser");
|
|
34 |
0
| Configuration config = ConfigurationManager.getConfiguration("advanced");
|
|
35 |
0
| String world = config.getProperty("hello");
|
|
36 |
0
| assertEquals("world",world);
|
|
37 |
| } |
|
38 |
| |
|
39 |
| } |