use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test3.
/**
* Create SQLNonTransientConnectionException with message, and SQLState
*/
@Test
public void test3() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(reason, state);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState().equals(state) && ex.getCause() == null && ex.getErrorCode() == 0);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test5.
/**
* Create SQLNonTransientConnectionException with message, SQLState, errorCode, and Throwable
*/
@Test
public void test5() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException(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.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test10.
/**
* Serialize a SQLNonTransientConnectionException and make sure you can
* read it back properly
*/
@Test
public void test10() throws Exception {
SQLNonTransientConnectionException e = new SQLNonTransientConnectionException(reason, state, errorCode, t);
SQLNonTransientConnectionException ex1 = createSerializedException(e);
assertTrue(reason.equals(ex1.getMessage()) && ex1.getSQLState().equals(state) && cause.equals(ex1.getCause().toString()) && ex1.getErrorCode() == errorCode);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test1.
/**
* Create SQLNonTransientConnectionException with no-arg constructor
*/
@Test
public void test1() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException();
assertTrue(ex.getMessage() == null && ex.getSQLState() == null && ex.getCause() == null && ex.getErrorCode() == 0);
}
use of java.sql.SQLNonTransientConnectionException in project jdk8u_jdk by JetBrains.
the class SQLNonTransientConnectionExceptionTests method test8.
/**
* Create SQLNonTransientConnectionException with null Throwable
*/
@Test
public void test8() {
SQLNonTransientConnectionException ex = new SQLNonTransientConnectionException((Throwable) null);
assertTrue(ex.getMessage() == null && ex.getSQLState() == null && ex.getCause() == null && ex.getErrorCode() == 0);
}
Aggregations