Package java.sql

Examples of java.sql.SQLDataException


    /**
     * @test java.sql.SQLDataException(String)
     */
    public void test_Constructor_LString() {
        SQLDataException sQLDataException = new SQLDataException("MYTESTSTRING");
        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);
    }
View Full Code Here


    /**
     * @test java.sql.SQLDataException(String)
     */
    public void test_Constructor_LString_1() {
        SQLDataException sQLDataException = new SQLDataException((String) 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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String)
     */
    public void test_Constructor_LStringLString() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2");
        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);

    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String)
     */
    public void test_Constructor_LStringLString_1() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", (String) 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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String)
     */
    public void test_Constructor_LStringLString_2() {
        SQLDataException sQLDataException = new SQLDataException(null,
                "MYTESTSTRING");
        assertNotNull(sQLDataException);
        assertEquals(
                "The SQLState of SQLDataException set and get should be equivalent",
                "MYTESTSTRING", 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, String)
     */
    public void test_Constructor_LStringLString_3() {
        SQLDataException sQLDataException = new SQLDataException((String) null,
                (String) 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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String, int)
     */
    public void test_Constructor_LStringLStringI() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", 1);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_1() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_2() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLDataException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_3() {
        SQLDataException sQLDataException = new SQLDataException(
                "MYTESTSTRING", null, 1);
        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);
    }
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.