Code example for LDAPCertStoreParameters

Methods: clonegetPortgetServerName

0
     * Test for <code>clone()</code> method<br> 
     * Assertion: Returns a copy of this object 
     */ 
    public final void testClone() { 
        LDAPCertStoreParameters cp1 =
            new LDAPCertStoreParameters("myhost", 1100);
        LDAPCertStoreParameters cp2 = (LDAPCertStoreParameters)cp1.clone();
        // check that that we have new object 
        assertTrue("newObject", cp1 != cp2);
        assertTrue("hostsTheSame",
                cp1.getServerName().equals(cp2.getServerName()));
        assertTrue("portsTheSame", cp1.getPort() == cp2.getPort());
    } 
 
    /** 
     * Test for <code>toString()</code> method<br> 
     * Assertion: returns the formatted string describing parameters 
     */ 
    public final void testToString() { 
        LDAPCertStoreParameters cp1 =
Connect your IDE to all the code out there  Get Codota for Java