Package org.jconfig.handler

Source Code of org.jconfig.handler.LDAPHandlerTest

/*
* LDAPHandlerTest.java
* JUnit based test
*
* Created on 8. Dezember 2002, 23:45
*/

package org.jconfig.handler;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.jconfig.Configuration;

/**
*
* @author Administrator
*/
public class LDAPHandlerTest extends TestCase {
   
    public LDAPHandlerTest(java.lang.String testName) {
        super(testName);
    }
   
    public static void main(java.lang.String[] args) {
        junit.textui.TestRunner.run(suite());
    }
   
    public static Test suite() {
        TestSuite suite = new TestSuite(LDAPHandlerTest.class);
        return suite;
    }
   
    public void testLoad() {
        LDAPHandler ldapHandler = new LDAPHandler();
        try {
            Configuration config = ldapHandler.load("so what");
            assertNotNull(config);
            String[] cats = config.getCategoryNames();
            //assertEquals(2,cats.length);
            for ( int i = 0; i < cats.length;i++) {
                System.out.println("CAT["+i+"]:"+cats[i]);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            fail("unpected exception");
        }
    }
   
}
TOP

Related Classes of org.jconfig.handler.LDAPHandlerTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.