Package org.apache.harmony.jndi.tests.javax.naming.spi.mock

Examples of org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockLdapContext


        "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockLdapContextFactory");
    Control[] cs = { new MyControl("c1", new byte[] { 1, 2, 3, 4 }, false),
        new MyControl("c1", new byte[] { 'a', 'b', 'c', 'd' }, true), };

    MyInitialLdapContext ctx = new MyInitialLdapContext(env, cs);
    MockLdapContext defaultCtx = (MockLdapContext) ctx.getDefaultContext();
    Object objCs = defaultCtx.getProps().get(
        "java.naming.ldap.control.connect");
    Object version = defaultCtx.getProps().get("java.naming.ldap.version");
    assertNotNull(version);
    Control[] cs2 = (Control[]) objCs;

    for (int i = 0; i < cs.length; i++) {
      assertEquals(cs2[i], cs[i]);
View Full Code Here

TOP

Related Classes of org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockLdapContext

Copyright © 2018 www.massapicom. 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.