Package java.sql

Examples of java.sql.SQLDataException


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


    /**
     * @test java.sql.SQLDataException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_19() {
        SQLDataException sQLDataException = new SQLDataException(null, null, 1,
                null);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertNull("The reason of SQLDataException should be null",
                sQLDataException.getMessage());
        assertEquals("The error code of SQLDataException should be 1",
                sQLDataException.getErrorCode(), 1);
        assertNull("The cause of SQLDataException should be null",
                sQLDataException.getCause());
    }
View Full Code Here

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

    /**
     * @test java.sql.SQLDataException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_21() {
        SQLDataException sQLDataException = new SQLDataException(null, null, 0,
                null);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertNull("The reason of SQLDataException should be null",
                sQLDataException.getMessage());
        assertEquals("The error code of SQLDataException should be 0",
                sQLDataException.getErrorCode(), 0);
        assertNull("The cause of SQLDataException should be null",
                sQLDataException.getCause());
    }
View Full Code Here

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

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

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

    /**
     * @test java.sql.SQLDataException(String, Throwable)
     */
    public void test_Constructor_LStringLThrowable_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(null, cause);
        assertNotNull(sQLDataException);
        assertNull("The reason of SQLDataException should be null",
                sQLDataException.getMessage());
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals("The error code of SQLDataException should be 0",
                sQLDataException.getErrorCode(), 0);
    }
View Full Code Here

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

    /**
     * @test java.sql.SQLDataException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", cause);
        assertNotNull(sQLDataException);
        assertEquals(
                "The SQLState of SQLDataException set and get should be equivalent",
                "MYTESTSTRING2", sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING1", sQLDataException.getMessage());
        assertEquals("The error code of SQLDataException should be 0",
                sQLDataException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLDataException set and get should be equivalent",
                cause, sQLDataException.getCause());
    }
View Full Code Here

TOP

Related Classes of java.sql.SQLDataException

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.