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