Package java.sql

Examples of java.sql.SQLDataException


    /**
     * @test java.sql.SQLDataException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_3() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0, null);
        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);
        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_4() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1, 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 -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_5() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
        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 -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_6() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, 1, cause);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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_7() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, 1, null);
        assertNotNull(sQLDataException);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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_8() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, 0, cause);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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_9() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, 0, null);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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_10() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, -1, cause);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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_11() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, -1, null);
        assertNotNull(sQLDataException);
        assertNull("The SQLState of SQLDataException should be null",
                sQLDataException.getSQLState());
        assertEquals(
                "The reason of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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

    private SQLDataException sQLDataException;

    @Override
    protected void setUp() throws Exception {
        sQLDataException = new SQLDataException("MYTESTSTRING", "MYTESTSTRING",
                1, new Exception("MYTHROWABLE"));
    }
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.