1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.jboss.cache.loader; |
8 |
| |
9 |
| import junit.framework.TestCase; |
10 |
| |
11 |
| import java.util.Properties; |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| public class FileCacheLoaderConfigTest extends TestCase |
19 |
| { |
20 |
| private FileCacheLoaderConfig fclc; |
21 |
| |
22 |
1
| protected void setUp() throws Exception
|
23 |
| { |
24 |
1
| fclc = new FileCacheLoaderConfig();
|
25 |
| } |
26 |
| |
27 |
1
| public void testSetProperties()
|
28 |
| { |
29 |
1
| fclc.setProperties((Properties)null);
|
30 |
1
| assertTrue(fclc.isCheckCharacterPortability());
|
31 |
1
| assertNull(fclc.getLocation());
|
32 |
| |
33 |
1
| Properties p = new Properties();
|
34 |
1
| p.setProperty("location", "any");
|
35 |
1
| fclc.setProperties(p);
|
36 |
1
| assertTrue(fclc.isCheckCharacterPortability());
|
37 |
1
| assertEquals("any", fclc.getLocation());
|
38 |
| |
39 |
1
| p.clear();
|
40 |
| |
41 |
1
| p.setProperty("check.character.portability", "true");
|
42 |
1
| fclc.setProperties(p);
|
43 |
1
| assertTrue(fclc.isCheckCharacterPortability());
|
44 |
1
| assertNull(fclc.getLocation());
|
45 |
| |
46 |
1
| p.clear();
|
47 |
| |
48 |
1
| p.setProperty("check.character.portability", "false");
|
49 |
1
| fclc.setProperties(p);
|
50 |
1
| assertFalse(fclc.isCheckCharacterPortability());
|
51 |
1
| assertNull(fclc.getLocation());
|
52 |
| } |
53 |
| } |