use of javax.security.cert.CertificateEncodingException in project robovm by robovm.
the class CertificateEncodingExceptionTest method testCertificateEncodingException02.
/**
* Test for <code>CertificateEncodingException(String)</code> constructor
* Assertion: constructs CertificateEncodingException with detail message
* msg. Parameter <code>msg</code> is not null.
*/
public void testCertificateEncodingException02() {
CertificateEncodingException tE;
for (int i = 0; i < msgs.length; i++) {
tE = new CertificateEncodingException(msgs[i]);
assertEquals("getMessage() must return: ".concat(msgs[i]), tE.getMessage(), msgs[i]);
assertNull("getCause() must return null", tE.getCause());
}
}
use of javax.security.cert.CertificateEncodingException in project j2objc by google.
the class CertificateEncodingExceptionTest method testCertificateEncodingException01.
/**
* Test for <code>CertificateEncodingException()</code> constructor
* Assertion: constructs CertificateEncodingException with no detail message
*/
public void testCertificateEncodingException01() {
CertificateEncodingException tE = new CertificateEncodingException();
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
use of javax.security.cert.CertificateEncodingException in project j2objc by google.
the class CertificateEncodingExceptionTest method testCertificateEncodingException03.
/**
* Test for <code>CertificateEncodingException(String)</code> constructor
* Assertion: constructs CertificateEncodingException when <code>msg</code>
* is null
*/
public void testCertificateEncodingException03() {
String msg = null;
CertificateEncodingException tE = new CertificateEncodingException(msg);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
use of javax.security.cert.CertificateEncodingException in project j2objc by google.
the class CertificateEncodingExceptionTest method testCertificateEncodingException02.
/**
* Test for <code>CertificateEncodingException(String)</code> constructor
* Assertion: constructs CertificateEncodingException with detail message
* msg. Parameter <code>msg</code> is not null.
*/
public void testCertificateEncodingException02() {
CertificateEncodingException tE;
for (int i = 0; i < msgs.length; i++) {
tE = new CertificateEncodingException(msgs[i]);
assertEquals("getMessage() must return: ".concat(msgs[i]), tE.getMessage(), msgs[i]);
assertNull("getCause() must return null", tE.getCause());
}
}
use of javax.security.cert.CertificateEncodingException in project j2objc by google.
the class X509CertificateTest method testGetInstance1.
/**
* getInstance(InputStream inStream) method testing.
*/
public void testGetInstance1() {
if (this.cert == null) {
// Test can not be applied.
return;
}
try {
ByteArrayInputStream bais = new ByteArrayInputStream(cert.getEncoded());
X509Certificate.getInstance(bais);
} catch (java.security.cert.CertificateEncodingException e) {
fail("Unexpected CertificateEncodingException was thrown.");
} catch (CertificateEncodingException e) {
fail("Unexpected CertificateEncodingException was thrown.");
} catch (CertificateException e) {
// The requested certificate type is not available.
// Test pass..
}
// Regression for HARMONY-756
try {
X509Certificate.getInstance((InputStream) null);
fail("No expected CertificateException");
} catch (CertificateException e) {
// expected;
}
}
Aggregations