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