|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| package org.jconfig.handler; |
|
9 |
| |
|
10 |
| import junit.framework.Test; |
|
11 |
| import junit.framework.TestCase; |
|
12 |
| import junit.framework.TestSuite; |
|
13 |
| |
|
14 |
| import org.jconfig.Configuration; |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| public class LDAPHandlerTest extends TestCase { |
|
21 |
| |
|
22 |
0
| public LDAPHandlerTest(java.lang.String testName) {
|
|
23 |
0
| super(testName);
|
|
24 |
| } |
|
25 |
| |
|
26 |
0
| public static void main(java.lang.String[] args) {
|
|
27 |
0
| junit.textui.TestRunner.run(suite());
|
|
28 |
| } |
|
29 |
| |
|
30 |
0
| public static Test suite() {
|
|
31 |
0
| TestSuite suite = new TestSuite(LDAPHandlerTest.class);
|
|
32 |
0
| return suite;
|
|
33 |
| } |
|
34 |
| |
|
35 |
0
| public void testLoad() {
|
|
36 |
0
| LDAPHandler ldapHandler = new LDAPHandler();
|
|
37 |
0
| try {
|
|
38 |
0
| Configuration config = ldapHandler.load("so what");
|
|
39 |
0
| assertNotNull(config);
|
|
40 |
0
| String[] cats = config.getCategoryNames();
|
|
41 |
| |
|
42 |
0
| for ( int i = 0; i < cats.length;i++) {
|
|
43 |
0
| System.out.println("CAT["+i+"]:"+cats[i]);
|
|
44 |
| } |
|
45 |
| } |
|
46 |
| catch (Exception e) { |
|
47 |
0
| e.printStackTrace();
|
|
48 |
0
| fail("unpected exception");
|
|
49 |
| } |
|
50 |
| } |
|
51 |
| |
|
52 |
| } |