use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test7.
/**
* Create SQLNonTransientConnectionException with message, and Throwable
*/
@Test
public void test7() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(reason, t);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState() == null && cause.equals(ex.getCause().toString()) && ex.getErrorCode() == 0);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test4.
/**
* Create SQLNonTransientConnectionException with message, SQLState, and error code
*/
@Test
public void test4() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(reason, state, errorCode);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState().equals(state) && ex.getCause() == null && ex.getErrorCode() == errorCode);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test.
/**
* Create SQLNonTransientConnectionException and setting all objects to null
*/
@Test
public void test() {
SQLNonTransientConnectionException e = new SQLNonTransientConnectionException(null, null, errorCode, null);
assertTrue(e.getMessage() == null && e.getSQLState() == null && e.getCause() == null && e.getErrorCode() == errorCode);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test9.
/**
* Create SQLNonTransientConnectionException with Throwable
*/
@Test
public void test9() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(t);
assertTrue(ex.getMessage().equals(cause) && ex.getSQLState() == null && cause.equals(ex.getCause().toString()) && ex.getErrorCode() == 0);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test2.
/**
* Create SQLNonTransientConnectionException with message
*/
@Test
public void test2() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(reason);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState() == null && ex.getCause() == null && ex.getErrorCode() == 0);
}
Aggregations