|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| package org.jconfig; |
|
9 |
| |
|
10 |
| import junit.framework.Test; |
|
11 |
| import junit.framework.TestCase; |
|
12 |
| import junit.framework.TestSuite; |
|
13 |
| |
|
14 |
| import org.jconfig.parser.DefaultConfigParser; |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| public class DirtyFlagTest extends TestCase { |
|
20 |
| |
|
21 |
| private Configuration cfg; |
|
22 |
| |
|
23 |
0
| public DirtyFlagTest(java.lang.String testName) {
|
|
24 |
0
| super(testName);
|
|
25 |
| } |
|
26 |
| |
|
27 |
0
| protected void setUp() {
|
|
28 |
0
| System.setProperty("jconfig.parser", DefaultConfigParser.class.getName());
|
|
29 |
0
| cfg = new DefaultConfiguration("DirtyFlagTest");
|
|
30 |
0
| assertNotNull(cfg);
|
|
31 |
| } |
|
32 |
| |
|
33 |
0
| public static Test suite() {
|
|
34 |
0
| TestSuite suite = new TestSuite(DirtyFlagTest.class);
|
|
35 |
0
| return suite;
|
|
36 |
| } |
|
37 |
| |
|
38 |
0
| public void testPropertyListener() {
|
|
39 |
0
| cfg.setProperty("testName","testValue","test");
|
|
40 |
0
| assertTrue(cfg.hasChanged());
|
|
41 |
| } |
|
42 |
| |
|
43 |
| } |