Package javax.naming

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


        } 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

            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

       
        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

        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$
        assertEquals("a/b/c", result.toString()); //$NON-NLS-1$

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

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

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

        result = initialContext.composeName(
                new CompositeName("testString"), new CompositeName("a/b/c/d")); //$NON-NLS-1$//$NON-NLS-2$
        assertEquals("testString", result.toString()); //$NON-NLS-1$
       
        CompositeName cn = new CompositeName("a/b/c"); //$NON-NLS-1$
        result = initialContext.composeName(cn, new CompositeName("prefix")); //$NON-NLS-1$
        cn.add("/d"); //$NON-NLS-1$
        assertEquals("a/b/c", result.toString()); //$NON-NLS-1$
    }
   
    /**
 
View Full Code Here

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

        String result = initialContext.composeName((String) null, (String) null);
        assertNull(result);

        result = initialContext.composeName((String) null, ""); //$NON-NLS-1$
        assertNull(result);
View Full Code Here

        InitialContext initialContext = new InitialContext();

        String result = initialContext.composeName((String) null, (String) null);
        assertNull(result);

        result = initialContext.composeName((String) null, ""); //$NON-NLS-1$
        assertNull(result);

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

        assertNull(result);

        result = initialContext.composeName((String) null, ""); //$NON-NLS-1$
        assertNull(result);

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