Package java.sql

Examples of java.sql.SQLSyntaxErrorException


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


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

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String)
     */
    public void test_Constructor_LStringLString() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                "MYTESTSTRING1", "MYTESTSTRING2");
        assertNotNull(sQLSyntaxErrorException);
        assertEquals(
                "The SQLState of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING2", sQLSyntaxErrorException.getSQLState());
        assertEquals(
                "The reason of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING1", sQLSyntaxErrorException.getMessage());
        assertEquals("The error code of SQLSyntaxErrorException should be 0",
                sQLSyntaxErrorException.getErrorCode(), 0);

    }
View Full Code Here

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

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

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

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                "MYTESTSTRING1", "MYTESTSTRING2", 1);
        assertNotNull(sQLSyntaxErrorException);
        assertEquals(
                "The SQLState of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING2", sQLSyntaxErrorException.getSQLState());
        assertEquals(
                "The reason of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING1", sQLSyntaxErrorException.getMessage());
        assertEquals("The error code of SQLSyntaxErrorException should be 1",
                sQLSyntaxErrorException.getErrorCode(), 1);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_1() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0);
        assertNotNull(sQLSyntaxErrorException);
        assertEquals(
                "The SQLState of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING2", sQLSyntaxErrorException.getSQLState());
        assertEquals(
                "The reason of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING1", sQLSyntaxErrorException.getMessage());
        assertEquals("The error code of SQLSyntaxErrorException should be 0",
                sQLSyntaxErrorException.getErrorCode(), 0);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_2() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1);
        assertNotNull(sQLSyntaxErrorException);
        assertEquals(
                "The SQLState of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING2", sQLSyntaxErrorException.getSQLState());
        assertEquals(
                "The reason of SQLSyntaxErrorException set and get should be equivalent",
                "MYTESTSTRING1", sQLSyntaxErrorException.getMessage());
        assertEquals("The error code of SQLSyntaxErrorException should be -1",
                sQLSyntaxErrorException.getErrorCode(), -1);
    }
View Full Code Here

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

TOP

Related Classes of java.sql.SQLSyntaxErrorException

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.