Code example for LDAPCertStoreParameters

Methods: getPort, getServerName

0
     * Assertion: Creates an instance of <code>LDAPCertStoreParameters</code> 
     * with the specified server name and a default port of 389 
     */ 
    public final void testLDAPCertStoreParametersString02() { 
        String serverName = "myhost";
        LDAPCertStoreParameters cp = new LDAPCertStoreParameters(serverName);
        assertTrue("host", serverName.equals(cp.getServerName()));
        assertEquals("port", 389, cp.getPort());
    } 
 
    /** 
     * Test #3 for <code>LDAPCertStoreParameters(String)</code> constructor<br> 
     * Assertion: throws <code>NullPointerException</code> - 
     * if <code>serverName</code> is <code>null</code> 
     */ 
    public final void testLDAPCertStoreParametersString03() { 
        try { 
            new LDAPCertStoreParameters(null);
            fail("NPE expected");
        } catch (NullPointerException e) {
        }