public void testToRuntime() { Exception runtime = new RuntimeException("test"); assertSame(runtime, exceptions.toRuntime(runtime)); Exception checkedException = new SQLException("test"); assertFalse(checkedException instanceof RuntimeException); Exception returned = exceptions.toRuntime(checkedException); assertTrue(returned instanceof RuntimeException); assertEquals(checkedException, returned.getCause()); }
public void testToRuntime() { Exception runtime = new RuntimeException("test"); assertSame(runtime, exceptions.toRuntime(runtime)); Exception checkedException = new SQLException("test"); assertFalse(checkedException instanceof RuntimeException); Exception returned = exceptions.toRuntime(checkedException); assertTrue(returned instanceof RuntimeException); assertEquals(checkedException, returned.getCause()); }
public void testToSQLException() { Exception testSQLE = new SQLException("test"); assertSame(testSQLE, exceptions.toSQLException(testSQLE)); Exception checkedException = new Exception("test"); assertFalse(checkedException instanceof SQLException); Exception returned = exceptions.toSQLException(checkedException); assertTrue(returned instanceof SQLException); assertEquals(checkedException, returned.getCause()); }
public void testToSQLException() { Exception testSQLE = new SQLException("test"); assertSame(testSQLE, exceptions.toSQLException(testSQLE)); Exception checkedException = new Exception("test"); assertFalse(checkedException instanceof SQLException); Exception returned = exceptions.toSQLException(checkedException); assertTrue(returned instanceof SQLException); assertEquals(checkedException, returned.getCause()); }
public void testToRuntime() { Exception runtime = new RuntimeException("test"); assertSame(runtime, exceptions.toRuntime(runtime)); Exception checkedException = new SQLException("test"); assertFalse(checkedException instanceof RuntimeException); Exception returned = exceptions.toRuntime(checkedException); assertTrue(returned instanceof RuntimeException); assertEquals(checkedException, returned.getCause()); }
public void testToSQLException() { Exception testSQLE = new SQLException("test"); assertSame(testSQLE, exceptions.toSQLException(testSQLE)); Exception checkedException = new Exception("test"); assertFalse(checkedException instanceof SQLException); Exception returned = exceptions.toSQLException(checkedException); assertTrue(returned instanceof SQLException); assertEquals(checkedException, returned.getCause()); }