Package java.sql

Examples of java.sql.SQLIntegrityConstraintViolationException


    /**
     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_5() {
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
        assertNotNull(sQLIntegrityConstraintViolationException);
        assertEquals(
                "The SQLState of SQLIntegrityConstraintViolationException set and get should be equivalent",
                "MYTESTSTRING2", sQLIntegrityConstraintViolationException
                        .getSQLState());
        assertEquals(
                "The reason of SQLIntegrityConstraintViolationException set and get should be equivalent",
                "MYTESTSTRING1", sQLIntegrityConstraintViolationException
                        .getMessage());
        assertEquals(
                "The error code of SQLIntegrityConstraintViolationException should be -1",
                sQLIntegrityConstraintViolationException.getErrorCode(), -1);
        assertNull(
                "The cause of SQLIntegrityConstraintViolationException should be null",
                sQLIntegrityConstraintViolationException.getCause());

    }
View Full Code Here


     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_6() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, 1, cause);
        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);
        assertEquals(
                "The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
                cause, sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_7() {
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, 1, null);
        assertNotNull(sQLIntegrityConstraintViolationException);
        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);
        assertNull(
                "The cause of SQLIntegrityConstraintViolationException should be null",
                sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_8() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, 0, cause);
        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);
        assertEquals(
                "The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
                cause, sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_9() {
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, 0, null);
        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);
        assertNull(
                "The cause of SQLIntegrityConstraintViolationException should be null",
                sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_10() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, -1, cause);
        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);
        assertEquals(
                "The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
                cause, sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_11() {
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", null, -1, null);
        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);
        assertNull(
                "The cause of SQLIntegrityConstraintViolationException should be null",
                sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

     * @test java.sql.SQLIntegrityConstraintViolationException(String, String,
     *       int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_12() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                null, "MYTESTSTRING", 1, cause);
        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);
        assertEquals(
                "The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
                cause, sQLIntegrityConstraintViolationException.getCause());
    }
View Full Code Here

public class SQLIntegrityConstraintViolationExceptionTest extends TestCase {

    private SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException;

    protected void setUp() throws Exception {
        sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING", "MYTESTSTRING", 1, new Exception("MYTHROWABLE"));
    }
View Full Code Here

    /**
     * @test java.sql.SQLIntegrityConstraintViolationException(String)
     */
    public void test_Constructor_LString() {
        SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
                "MYTESTSTRING");
        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

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.