Code example for LDAPCertStoreParameters

Methods: getPortgetServerName

0
     */ 
    public final void testLDAPCertStoreParametersStringint02() { 
        String serverName = "myhost";
        int portNumber = 1099;
        LDAPCertStoreParameters cp =
            new LDAPCertStoreParameters(serverName, portNumber);
        assertTrue("host", serverName.equals(cp.getServerName()));
        assertTrue("port", cp.getPort() == portNumber);
    } 
 
    /** 
     * Test #3 for <code>LDAPCertStoreParameters(String, int)</code> constructor<br> 
     * Assertion: throws <code>NullPointerException</code> - 
     * if <code>serverName</code> is <code>null</code> 
     */ 
    public final void testLDAPCertStoreParametersStringint03() { 
        try { 
            new LDAPCertStoreParameters(null, 0);
            fail("NPE expected");
        } catch (NullPointerException e) {
        }