Package java.sql

Examples of java.sql.SQLIntegrityConstraintViolationException


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


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

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

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

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

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

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

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

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

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

TOP

Related Classes of java.sql.SQLIntegrityConstraintViolationException

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.