Add tests for custom Throwable subclass
This commit is contained in:
parent
bbf5714b5a
commit
6ea4e39087
|
@ -630,6 +630,11 @@ public class ExceptionUtilsTest extends AbstractLangTest {
|
||||||
assertFalse(ExceptionUtils.isChecked(new IllegalArgumentException()));
|
assertFalse(ExceptionUtils.isChecked(new IllegalArgumentException()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsCheckedCustomThrowable() {
|
||||||
|
assertTrue(ExceptionUtils.isChecked(new TestThrowable()));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsUnchecked_checked() {
|
public void testIsUnchecked_checked() {
|
||||||
assertFalse(ExceptionUtils.isUnchecked(new IOException()));
|
assertFalse(ExceptionUtils.isUnchecked(new IOException()));
|
||||||
|
@ -645,6 +650,11 @@ public class ExceptionUtilsTest extends AbstractLangTest {
|
||||||
assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException()));
|
assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsUnCheckedCustomThrowable() {
|
||||||
|
assertFalse(ExceptionUtils.isUnchecked(new TestThrowable()));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPrintRootCauseStackTrace_Throwable() {
|
public void testPrintRootCauseStackTrace_Throwable() {
|
||||||
ExceptionUtils.printRootCauseStackTrace(null);
|
ExceptionUtils.printRootCauseStackTrace(null);
|
||||||
|
|
Loading…
Reference in New Issue