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

Examples of org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest.MockReferenceable


        Attributes a = new BasicAttributes();
        assertGetObjectResult(r, null, null, env, a);

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        assertGetObjectResult(mr, null, null, env, a);
    }
View Full Code Here


        Attributes a = new BasicAttributes();
        Object obj = DirectoryManager.getObjectInstance(r, null, null, env, a);
        assertSame(r, obj);

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        obj = DirectoryManager.getObjectInstance(mr, null, null, env, a);
        assertSame(mr, obj);
    }
View Full Code Here

        } catch (NullPointerException e) {
            //
        }

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        NamingManagerTest.indicateNamingException(env);
        try {
            DirectoryManager.getObjectInstance(mr, null, null,
                    env, a);
            fail("Should throw NamingException.");
View Full Code Here

        Attributes a = new BasicAttributes();
        Object obj = DirectoryManager.getObjectInstance(r, null, null, env, a);
        assertNull(obj);

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        NamingManagerTest.indicateReturnNull(env);
        obj = DirectoryManager.getObjectInstance(mr, null, null, env, a);
        assertNull(obj);
    }
View Full Code Here

        } catch (NullPointerException e) {
            //
        }

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        try {
            DirectoryManager.getObjectInstance(mr,
                    new CompositeName("compositename"), new MockContext(
                            new Hashtable<String, String>()), env, a);
            fail("Should throw NullPointerException.");
View Full Code Here

        boolean equals = ctx.parameterEquals(validFactoryAddr.getContent(), n,
                c, env, null); // it's NOT a!!
        assertTrue(equals);

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        ctx = (MockDirContext3) DirectoryManager.getObjectInstance(mr, n, c,
                env, a);

        assertTrue(ctx.parameterEquals(validFactoryAddr.getContent(), n, c,
                env, null)); // it's NOT a!!
View Full Code Here

        assertEquals(obj,
                new dir2URLContextFactory.MockObject(addr.getContent(),
                        new CompositeName("compositename"), null, env, a));

        // test Referenceable
        MockReferenceable mr = new MockReferenceable(r);
        obj = (dir2URLContextFactory.MockObject) DirectoryManager
                .getObjectInstance(mr.getReference(), new CompositeName(
                        "compositename"), null, env, a);

        assertEquals(obj,
                new dir2URLContextFactory.MockObject(addr.getContent(),
                        new CompositeName("compositename"), null, env, a));
View Full Code Here

            } catch (NamingException e) {
                assertTrue(e.getRootCause() instanceof NullPointerException);
            }

            // test Referenceable
            MockReferenceable mr = new MockReferenceable(r);
            try {
                NamingManagerTest.indicateNamingException(env);
                DirectoryManager
                        .getObjectInstance(mr, new CompositeName(
                                "compositename"), new MockContext(ctxEnv), env,
View Full Code Here

            } catch (NamingException e) {
                assertTrue(e.getRootCause() instanceof NullPointerException);
            }

            // test Referenceable
            MockReferenceable mr = new MockReferenceable(r);
            try {
                NamingManagerTest.indicateNamingException(ctxEnv);
                DirectoryManager
                        .getObjectInstance(mr, new CompositeName(
                                "compositename"), new MockContext(ctxEnv),
View Full Code Here

TOP

Related Classes of org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest.MockReferenceable

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.