Package java.sql

Examples of java.sql.SQLSyntaxErrorException


    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_4() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                "MYTESTSTRING", null, 0);
        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, int)
     */
    public void test_Constructor_LStringLStringI_5() {
        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

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_6() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, "MYTESTSTRING", 1);
        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 1",
                sQLSyntaxErrorException.getErrorCode(), 1);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_7() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, "MYTESTSTRING", 0);
        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, int)
     */
    public void test_Constructor_LStringLStringI_8() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, "MYTESTSTRING", -1);
        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 -1",
                sQLSyntaxErrorException.getErrorCode(), -1);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_9() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, null, 1);
        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 1",
                sQLSyntaxErrorException.getErrorCode(), 1);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_10() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, null, 0);
        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_11() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                null, null, -1);
        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 -1",
                sQLSyntaxErrorException.getErrorCode(), -1);
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(Throwable)
     */
    public void test_Constructor_LThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                cause);
        assertNotNull(sQLSyntaxErrorException);
        assertEquals(
                "The reason of SQLSyntaxErrorException should be equals to cause.toString()",
                "java.lang.Exception: MYTHROWABLE", sQLSyntaxErrorException
                        .getMessage());
        assertNull("The SQLState of SQLSyntaxErrorException should be null",
                sQLSyntaxErrorException.getSQLState());
        assertEquals("The error code of SQLSyntaxErrorException should be 0",
                sQLSyntaxErrorException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLSyntaxErrorException set and get should be equivalent",
                cause, sQLSyntaxErrorException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLSyntaxErrorException(Throwable)
     */
    public void test_Constructor_LThrowable_1() {
        SQLSyntaxErrorException sQLSyntaxErrorException = new SQLSyntaxErrorException(
                (Throwable) 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);
        assertNull("The cause of SQLSyntaxErrorException should be null",
                sQLSyntaxErrorException.getCause());
    }
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.