use of java.sql.SQLNonTransientException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientExceptionTests method test9.
/**
* Create SQLNonTransientException with Throwable
*/
@Test
public void test9() {
SQLNonTransientException ex = new SQLNonTransientException(t);
assertTrue(ex.getMessage().equals(cause) && ex.getSQLState() == null && cause.equals(ex.getCause().toString()) && ex.getErrorCode() == 0);
}
use of java.sql.SQLNonTransientException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientExceptionTests method test5.
/**
* Create SQLNonTransientException with message, SQLState, errorCode, and Throwable
*/
@Test
public void test5() {
SQLNonTransientException ex = new SQLNonTransientException(reason, state, errorCode, t);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState().equals(state) && cause.equals(ex.getCause().toString()) && ex.getErrorCode() == errorCode);
}
use of java.sql.SQLNonTransientException in project jdk8u_jdk by JetBrains.
the class SQLDataExceptionTests method test13.
/**
* Create SQLDataException and validate it is an instance of
* SQLNonTransientException
*/
@Test
public void test13() {
Exception ex = new SQLDataException();
assertTrue(ex instanceof SQLNonTransientException);
}
use of java.sql.SQLNonTransientException in project jdk8u_jdk by JetBrains.
the class SQLFeatureNotSupportedExceptionTests method test13.
/**
* Create SQLFeatureNotSupportedException and validate it is an instance of
* SQLNonTransientException
*/
@Test
public void test13() {
Exception ex = new SQLFeatureNotSupportedException();
assertTrue(ex instanceof SQLNonTransientException);
}
Aggregations