Package java.sql

Examples of java.sql.SQLRecoverableException


    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_12() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", 1, cause);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 1",
                sQLRecoverableException.getErrorCode(), 1);
        assertEquals(
                "The cause of SQLRecoverableException set and get should be equivalent",
                cause, sQLRecoverableException.getCause());
    }
View Full Code Here


    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_13() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", 1, null);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 1",
                sQLRecoverableException.getErrorCode(), 1);
        assertNull("The cause of SQLRecoverableException should be null",
                sQLRecoverableException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_14() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", 0, cause);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLRecoverableException set and get should be equivalent",
                cause, sQLRecoverableException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_15() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", 0, null);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
        assertNull("The cause of SQLRecoverableException should be null",
                sQLRecoverableException.getCause());

    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_16() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", -1, cause);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be -1",
                sQLRecoverableException.getErrorCode(), -1);
        assertEquals(
                "The cause of SQLRecoverableException set and get should be equivalent",
                cause, sQLRecoverableException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_17() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", -1, null);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be -1",
                sQLRecoverableException.getErrorCode(), -1);
        assertNull("The cause of SQLRecoverableException should be null",
                sQLRecoverableException.getCause());
    }
View Full Code Here

public class SQLRecoverableExceptionTest extends TestCase {

    private SQLRecoverableException sQLRecoverableException;

    protected void setUp() throws Exception {
        sQLRecoverableException = new SQLRecoverableException("MYTESTSTRING",
                "MYTESTSTRING", 1, new Exception("MYTHROWABLE"));
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String)
     */
    public void test_Constructor_LString() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING");
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertEquals(
                "The reason of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String)
     */
    public void test_Constructor_LString_1() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                (String) null);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
    }
View Full Code Here

  public static SQLException newSQLTimeoutException(String reason, String SQLState, int vendorCode) {
    return new SQLTimeoutException(reason, SQLState, vendorCode);
  }

  public static SQLException newSQLRecoverableException(String reason, String SQLState, int vendorCode) {
    return new SQLRecoverableException(reason, SQLState, vendorCode);
  }
View Full Code Here

TOP

Related Classes of java.sql.SQLRecoverableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.