Search in sources :

Example 11 with SQLClientInfoException

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

Example 12 with SQLClientInfoException

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

Example 13 with SQLClientInfoException

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

Example 14 with SQLClientInfoException

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

Example 15 with SQLClientInfoException

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

Aggregations

SQLClientInfoException (java.sql.SQLClientInfoException)17 Test (org.testng.annotations.Test)12 BaseTest (util.BaseTest)12 SQLException (java.sql.SQLException)5 SysProperties (com.wplatform.ddal.engine.SysProperties)1 DbException (com.wplatform.ddal.message.DbException)1 ValueString (com.wplatform.ddal.value.ValueString)1 Blob (java.sql.Blob)1 Connection (java.sql.Connection)1 PreparedStatement (java.sql.PreparedStatement)1 ResultSet (java.sql.ResultSet)1 SQLFeatureNotSupportedException (java.sql.SQLFeatureNotSupportedException)1 SQLWarning (java.sql.SQLWarning)1 Savepoint (java.sql.Savepoint)1 Statement (java.sql.Statement)1 Properties (java.util.Properties)1