use of java.security.ProviderException in project j2objc by google.
the class ProviderExceptionTest method testProviderException09.
/**
* Test for <code>ProviderException(String, Throwable)</code> constructor
* Assertion: constructs ProviderException when <code>cause</code> is not
* null <code>msg</code> is not null
*/
public void testProviderException09() {
ProviderException tE;
for (int i = 0; i < msgs.length; i++) {
tE = new ProviderException(msgs[i], tCause);
String getM = tE.getMessage();
String toS = tCause.toString();
if (msgs[i].length() > 0) {
assertTrue("getMessage() must contain ".concat(msgs[i]), getM.indexOf(msgs[i]) != -1);
if (!getM.equals(msgs[i])) {
assertTrue("getMessage() should contain ".concat(toS), getM.indexOf(toS) != -1);
}
}
assertNotNull("getCause() must not return null", tE.getCause());
assertEquals("getCause() must return ".concat(tCause.toString()), tE.getCause(), tCause);
}
}
use of java.security.ProviderException in project j2objc by google.
the class ProviderExceptionTest method testProviderException01.
/**
* Test for <code>ProviderException()</code> constructor Assertion:
* constructs ProviderException with no detail message
*/
public void testProviderException01() {
ProviderException tE = new ProviderException();
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
use of java.security.ProviderException in project j2objc by google.
the class ProviderExceptionTest method testProviderException03.
/**
* Test for <code>ProviderException(String)</code> constructor Assertion:
* constructs ProviderException when <code>msg</code> is null
*/
public void testProviderException03() {
String msg = null;
ProviderException tE = new ProviderException(msg);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
use of java.security.ProviderException in project j2objc by google.
the class ProviderExceptionTest method testProviderException05.
/**
* Test for <code>ProviderException(Throwable)</code> constructor
* Assertion: constructs ProviderException when <code>cause</code> is not
* null
*/
public void testProviderException05() {
ProviderException tE = new ProviderException(tCause);
if (tE.getMessage() != null) {
String toS = tCause.toString();
String getM = tE.getMessage();
assertTrue("getMessage() should contain ".concat(toS), (getM.indexOf(toS) != -1));
}
assertNotNull("getCause() must not return null", tE.getCause());
assertEquals("getCause() must return ".concat(tCause.toString()), tE.getCause(), tCause);
}
use of java.security.ProviderException in project j2objc by google.
the class ProviderExceptionTest method testProviderException08.
/**
* Test for <code>ProviderException(String, Throwable)</code> constructor
* Assertion: constructs ProviderException when <code>cause</code> is not
* null <code>msg</code> is null
*/
public void testProviderException08() {
ProviderException tE = new ProviderException(null, tCause);
if (tE.getMessage() != null) {
String toS = tCause.toString();
String getM = tE.getMessage();
assertTrue("getMessage() must should ".concat(toS), (getM.indexOf(toS) != -1));
}
assertNotNull("getCause() must not return null", tE.getCause());
assertEquals("getCause() must return ".concat(tCause.toString()), tE.getCause(), tCause);
}
Aggregations