KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ca > commons > jndi > BasicOpsTest


1 /**
2  * Created by IntelliJ IDEA.
3  * User: betch01
4  * Date: Dec 3, 2002
5  * Time: 12:10:04 PM
6  * To change this template use Options | File Templates.
7  */

8 package com.ca.commons.jndi;
9
10 import junit.framework.*;
11
12 public class BasicOpsTest extends TestCase
13 {
14     public BasicOpsTest(String JavaDoc name)
15      {
16          super(name);
17      }
18
19      public static Test suite()
20      {
21          return new TestSuite(BasicOpsTest.class);
22      }
23
24      public static void main (String JavaDoc[] args)
25      {
26          System.out.println("Running basic ops test");
27          junit.textui.TestRunner.run(suite());
28      }
29
30 /*
31 // requires test ldap server to run
32      public static void testSlash() throws NamingException
33      {
34
35          String ldapServerURL = "ldap://betch01:19389";
36
37          System.out.println("Running slash test");
38
39          ConnectionData con = new ConnectionData();
40          con.setURL(ldapServerURL);
41          BasicOps ops = new BasicOps(con);
42
43          NameParser nameParser = ops.getContext().getNameParser("");
44          NamingEnumeration bloop = ops.list("o=Democorp,c=au");
45          while (bloop.hasMoreElements())
46          {
47              SearchResult result = (SearchResult)bloop.nextElement();
48              String name = result.getName();
49              System.out.println("\n1: " + name);
50              System.out.println("2: " + new CompositeName(name).get(0));
51              String ldapString = new CompositeName(name).get(0);
52              Name realName = ops.getContext().getNameParser("").parse(ldapString);
53              System.out.println("3: " + realName.toString());
54          }
55      }
56 */

57
58      public void testStuff()
59      {
60      }
61
62 }
63
Popular Tags