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()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsCheckedCustomThrowable() {
|
||||
assertTrue(ExceptionUtils.isChecked(new TestThrowable()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsUnchecked_checked() {
|
||||
assertFalse(ExceptionUtils.isUnchecked(new IOException()));
|
||||
|
@ -645,6 +650,11 @@ public class ExceptionUtilsTest extends AbstractLangTest {
|
|||
assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsUnCheckedCustomThrowable() {
|
||||
assertFalse(ExceptionUtils.isUnchecked(new TestThrowable()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPrintRootCauseStackTrace_Throwable() {
|
||||
ExceptionUtils.printRootCauseStackTrace(null);
|
||||
|
|
Loading…
Reference in New Issue