ObjectUtilsTest#testIdentityToStringAppendable: fail test if IOException is thrown
This commit is contained in:
parent
aaeb4c621a
commit
5bdf0a938a
|
@ -257,13 +257,17 @@ public void testIdentityToStringAppendable() {
|
||||||
try {
|
try {
|
||||||
ObjectUtils.identityToString((Appendable)null, "tmp");
|
ObjectUtils.identityToString((Appendable)null, "tmp");
|
||||||
fail("NullPointerException expected");
|
fail("NullPointerException expected");
|
||||||
} catch(final NullPointerException | IOException npe) {
|
} catch(final NullPointerException expectedException) {
|
||||||
|
} catch(final IOException ex) {
|
||||||
|
fail("IOException unexpected");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ObjectUtils.identityToString((Appendable)(new StringBuilder()), null);
|
ObjectUtils.identityToString((Appendable)(new StringBuilder()), null);
|
||||||
fail("NullPointerException expected");
|
fail("NullPointerException expected");
|
||||||
} catch(final NullPointerException | IOException npe) {
|
} catch(final NullPointerException expectedException) {
|
||||||
|
} catch(final IOException ex) {
|
||||||
|
fail("IOException unexpected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue