Skip to content

Commit

Permalink
Add tests for custom Throwable subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 3, 2023
1 parent bbf5714 commit 6ea4e39
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@ public void testIsChecked_unchecked() {
assertFalse(ExceptionUtils.isChecked(new IllegalArgumentException()));
}

@Test
public void testIsCheckedCustomThrowable() {
assertTrue(ExceptionUtils.isChecked(new TestThrowable()));
}

@Test
public void testIsUnchecked_checked() {
assertFalse(ExceptionUtils.isUnchecked(new IOException()));
Expand All @@ -645,6 +650,11 @@ public void testIsUnchecked_unchecked() {
assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException()));
}

@Test
public void testIsUnCheckedCustomThrowable() {
assertFalse(ExceptionUtils.isUnchecked(new TestThrowable()));
}

@Test
public void testPrintRootCauseStackTrace_Throwable() {
ExceptionUtils.printRootCauseStackTrace(null);
Expand Down

0 comments on commit 6ea4e39

Please sign in to comment.