Sort members

This commit is contained in:
Gary Gregory 2023-10-17 11:16:54 -04:00
parent 3935fa2f19
commit 582717de05
1 changed files with 12 additions and 12 deletions

View File

@ -643,11 +643,6 @@ public class ExceptionUtilsTest extends AbstractLangTest {
assertTrue(ExceptionUtils.isChecked(new TestThrowable())); assertTrue(ExceptionUtils.isChecked(new TestThrowable()));
} }
@Test
public void testIsUnchecked_null() {
assertFalse(ExceptionUtils.isUnchecked(null));
}
@Test @Test
public void testIsUnchecked_checked() { public void testIsUnchecked_checked() {
assertFalse(ExceptionUtils.isUnchecked(new IOException())); assertFalse(ExceptionUtils.isUnchecked(new IOException()));
@ -658,6 +653,11 @@ public class ExceptionUtilsTest extends AbstractLangTest {
assertTrue(ExceptionUtils.isUnchecked(new StackOverflowError())); assertTrue(ExceptionUtils.isUnchecked(new StackOverflowError()));
} }
@Test
public void testIsUnchecked_null() {
assertFalse(ExceptionUtils.isUnchecked(null));
}
@Test @Test
public void testIsUnchecked_unchecked() { public void testIsUnchecked_unchecked() {
assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException())); assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException()));
@ -728,6 +728,13 @@ public class ExceptionUtilsTest extends AbstractLangTest {
assertThrows(NullPointerException.class, () -> ExceptionUtils.removeCommonFrames(null, null)); assertThrows(NullPointerException.class, () -> ExceptionUtils.removeCommonFrames(null, null));
} }
@Test
public void testRethrow() {
final Exception expected = new InterruptedException();
final Exception actual = assertThrows(Exception.class, () -> ExceptionUtils.rethrow(expected));
assertSame(expected, actual);
}
@Test @Test
public void testStream_jdkNoCause() { public void testStream_jdkNoCause() {
assertEquals(1, ExceptionUtils.stream(jdkNoCause).count()); assertEquals(1, ExceptionUtils.stream(jdkNoCause).count());
@ -772,13 +779,6 @@ public class ExceptionUtilsTest extends AbstractLangTest {
assertSame(withoutCause, throwables.get(0)); assertSame(withoutCause, throwables.get(0));
} }
@Test
public void testRethrow() {
final Exception expected = new InterruptedException();
final Exception actual = assertThrows(Exception.class, () -> ExceptionUtils.rethrow(expected));
assertSame(expected, actual);
}
@Test @Test
public void testThrowableOf_ThrowableClass() { public void testThrowableOf_ThrowableClass() {
assertNull(ExceptionUtils.throwableOfThrowable(null, null)); assertNull(ExceptionUtils.throwableOfThrowable(null, null));