ldaphandlertest.java

来自「jConfig,JAVA读取XML的开源项目」· Java 代码 · 共 53 行

JAVA
53
字号
/*
 * 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");
        }
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?