Examples of composeName()


Examples of javax.naming.Context.composeName()

        // error
        name = ProviderConstants.ROOT_ZONE_NAME_OBJ;
        prefix = new CompositeName("schema33:/domain.com");
        try {
            result = ctx.composeName(name, prefix);
            fail("NamingException should be thrown");
        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
View Full Code Here

Examples of javax.naming.Context.composeName()

            result = ctx.composeName(name, prefix);
            fail("NamingException should be thrown");
        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
View Full Code Here

Examples of javax.naming.Context.composeName()

        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
View Full Code Here

Examples of javax.naming.Context.composeName()

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
View Full Code Here

Examples of javax.naming.Context.composeName()

        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
            ctx.composeName(".", "schema17:/example.com");
            fail("NamingException should be thrown");
View Full Code Here

Examples of javax.naming.Context.composeName()

        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
            ctx.composeName(".", "schema17:/example.com");
            fail("NamingException should be thrown");
        } catch (NamingException e) {}
    }

    public void testConstructor() throws NoSuchFieldException,
View Full Code Here

Examples of javax.naming.InitialContext.composeName()

            throws NamingException {
        log.setMethod("testComposeName_string_null"); //$NON-NLS-1$
        InitialContext initialContext = new InitialContext();

        try {
            initialContext.composeName((CompositeName) null,
                    (CompositeName) null);
            fail("Should throw NullPointerException"); //$NON-NLS-1$
        } catch (NullPointerException e) {
            // expected
        }
View Full Code Here

Examples of javax.naming.InitialContext.composeName()

        } catch (NullPointerException e) {
            // expected
        }
       
        try {
            initialContext.composeName(null, new CompositeName("prefix")); //$NON-NLS-1$
            fail("Should throw NullPointerException"); //$NON-NLS-1$
        } catch (NullPointerException e) {
            // expected
        }
       
View Full Code Here

Examples of javax.naming.InitialContext.composeName()

            fail("Should throw NullPointerException"); //$NON-NLS-1$
        } catch (NullPointerException e) {
            // expected
        }
       
        Name result = initialContext.composeName(
                new CompositeName("a/b/c"), (CompositeName) null); //$NON-NLS-1$
        assertEquals("a/b/c", result.toString()); //$NON-NLS-1$

        result = initialContext.composeName(
                new CompositeName("a/b/c"), new CompositeName("")); //$NON-NLS-1$//$NON-NLS-2$
View Full Code Here

Examples of javax.naming.InitialContext.composeName()

       
        Name result = initialContext.composeName(
                new CompositeName("a/b/c"), (CompositeName) null); //$NON-NLS-1$
        assertEquals("a/b/c", result.toString()); //$NON-NLS-1$

        result = initialContext.composeName(
                new CompositeName("a/b/c"), new CompositeName("")); //$NON-NLS-1$//$NON-NLS-2$
        assertEquals("a/b/c", result.toString()); //$NON-NLS-1$
       
        result = initialContext.composeName(
                new CompositeName("a/b/c"), new CompositeName("prefix")); //$NON-NLS-1$//$NON-NLS-2$
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.