Search in sources :

Example 1 with SQLInvalidAuthorizationSpecException

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);
}
Also used : SQLNonTransientException(java.sql.SQLNonTransientException) SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) SQLException(java.sql.SQLException) SQLNonTransientException(java.sql.SQLNonTransientException) SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 2 with SQLInvalidAuthorizationSpecException

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);
}
Also used : SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 3 with SQLInvalidAuthorizationSpecException

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);
}
Also used : SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 4 with SQLInvalidAuthorizationSpecException

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);
}
Also used : SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 5 with SQLInvalidAuthorizationSpecException

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);
}
Also used : SQLInvalidAuthorizationSpecException(java.sql.SQLInvalidAuthorizationSpecException) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Aggregations

SQLInvalidAuthorizationSpecException (java.sql.SQLInvalidAuthorizationSpecException)14 Test (org.testng.annotations.Test)14 BaseTest (util.BaseTest)14 SQLException (java.sql.SQLException)2 SQLNonTransientException (java.sql.SQLNonTransientException)1