Examples of MockDirContext


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

  public void testGetStateToBind_null_name_ctx_hash() {
    log.setMethod("testGetStateToBind_null_name_ctx_hash()");
    Object o = null;
    Name n = new CompositeName();
    Context c = new MockDirContext(new Hashtable<Object, Object>());
    // lead to state factory
    Hashtable<String, String> h = new Hashtable<String, String>();
    h
        .put(Context.STATE_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MagicMockStateFactory");
View Full Code Here

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

    }
    if (null != h) {
      r.put("h", h);
    }
    r.put("url.schema", "http");
    return new MockDirContext(r);
  }
View Full Code Here

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

    }
    if (null != h) {
      r.put("h", h);
    }
    r.put("url.schema", "a_b_c");
    return new MockDirContext(r);
  }
View Full Code Here

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

    }
    if (null != h) {
      r.put("h", h);
    }
    r.put("url.schema", "abc");
    return new MockDirContext(r);
  }
View Full Code Here

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

    }
    if (null != h) {
      r.put("h", h);
    }
    r.put("url.schema", "http");
    return new MockDirContext(r);
  }
View Full Code Here

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

    }
    if (null != h) {
      r.put("h", h);
    }
    r.put("url.schema", "https");
    return new MockDirContext(r);
  }
View Full Code Here

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

  public void testGetStateToBind_obj_name_ctx_hash() {
    log.setMethod("testGetStateToBind_obj_name_ctx_hash()");
    Object o = "object";
    Name n = new CompositeName();
    Context c = new MockDirContext(new Hashtable<Object, Object>());
    // lead to state factory
    Hashtable<String, String> h = new Hashtable<String, String>();
    h
        .put(Context.STATE_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MagicMockStateFactory");
View Full Code Here

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

  public void testGetStateToBind_f1NamingException_f2Success() {
    log.setMethod("testGetStateToBind_f1NamingException_f2Success()");
    Object o = "object";
    Name n = new CompositeName();
    Context c = new MockDirContext(new Hashtable<Object, Object>());
    // lead to state factory
    Hashtable<String, Object> h = new Hashtable<String, Object>();
    h
        .put(Context.STATE_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MagicMockStateFactory");
View Full Code Here

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

  public void testGetStateToBind_f1RuntimeException_f2Success() {
    log.setMethod("testGetStateToBind_f1RuntimeException_f2Success()");
    Object o = "object";
    Name n = new CompositeName();
    Context c = new MockDirContext(new Hashtable<Object, Object>());
    // lead to state factory
    Hashtable<Object, Object> h = new Hashtable<Object, Object>();
    h
        .put(Context.STATE_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MagicMockStateFactory");
View Full Code Here

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

  public void testGetStateToBind_f1Success_f2Success() {
    log.setMethod("testGetStateToBind_f1Success_f2Success()");
    Object o = "object";
    Name n = new CompositeName();
    Context c = new MockDirContext(new Hashtable<Object, Object>());
    // lead to state factory
    Hashtable<Object, Object> h = new Hashtable<Object, Object>();
    h
        .put(Context.STATE_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MagicSuccessMockStateFactory");
View Full Code Here
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.