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

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


        try {
            Hashtable<?, ?> ctxEnv = new Hashtable<Object, Object>();
            NamingManagerTest.writeProviderResource(
                    "org.apache.harmony.jndi.tests.javax.naming.spi.dummy", ctxEnv);

            DirContext ctx = new MockDirContext2(ctxEnv);

            Hashtable<String, String> env = new Hashtable<String, String>();
            env.put(Context.INITIAL_CONTEXT_FACTORY,
                    "dazzle.jndi.testing.spi.DazzleContextFactory");
            env
View Full Code Here


    public void testGetStateToBind_null_name_ctx_hash_null() {
       
        Object o = null;
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_null_name_ctx_hash_attr() {
       
        Object o = null;
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = new BasicAttributes();
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_obj_name_ctx_hash_null() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_obj_name_ctx_hash_attr() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = new BasicAttributes();
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_f1NamingException_f2Success() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_f1RuntimeException_f2Success() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_f1ReturnNull_f2Success() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockDirStateFactory");
View Full Code Here

    public void testGetStateToBind_f1Success_f2Success() {
       
        Object o = "object";
        Name n = new CompositeName();
        Context c = new MockDirContext2(new Hashtable<Object, Object>());
        // lead to state factory
        Hashtable<Object, Object> h = new Hashtable<Object, Object>();
        Attributes a = null;
        h.put(Context.STATE_FACTORIES,
                "org.apache.harmony.jndi.tests.javax.naming.spi.mock.SuccessMockDirStateFactory");
View Full Code Here

TOP

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

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.