use of java.security.cert.LDAPCertStoreParameters in project robovm by robovm.
the class LDAPCertStoreParametersTest method testLDAPCertStoreParametersString01.
/**
* Test #1 for <code>LDAPCertStoreParameters(String)</code> constructor<br>
* Assertion: Creates an instance of <code>LDAPCertStoreParameters</code>
* with the specified server name and a default port of 389
*/
public final void testLDAPCertStoreParametersString01() {
CertStoreParameters cp = new LDAPCertStoreParameters("myhost");
assertTrue("isLDAPCertStoreParameters", cp instanceof LDAPCertStoreParameters);
}
use of java.security.cert.LDAPCertStoreParameters in project robovm by robovm.
the class LDAPCertStoreParametersTest method testClone.
/**
* 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());
}
use of java.security.cert.LDAPCertStoreParameters in project robovm by robovm.
the class LDAPCertStoreParametersTest method testGetServerName.
/**
* Test for <code>toString()</code> method<br>
* Assertion: returns the server name (never <code>null</code>)
*/
public final void testGetServerName() {
LDAPCertStoreParameters cp = new LDAPCertStoreParameters("serverName");
assertNotNull(cp.getServerName());
}
use of java.security.cert.LDAPCertStoreParameters in project robovm by robovm.
the class LDAPCertStoreParametersTest method testLDAPCertStoreParametersString02.
/**
* Test #2 for <code>LDAPCertStoreParameters(String)</code> constructor<br>
* 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());
}
use of java.security.cert.LDAPCertStoreParameters in project robovm by robovm.
the class LDAPCertStoreParametersTest method testGetPort.
/**
* Test for <code>toString()</code> method<br>
* Assertion: returns the port number
*/
public final void testGetPort() {
int portNumber = -1099;
LDAPCertStoreParameters cp = new LDAPCertStoreParameters("serverName", portNumber);
assertTrue(cp.getPort() == portNumber);
}
Aggregations