Package java.sql

Examples of java.sql.SQLTimeoutException


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


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

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

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

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

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

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

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

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

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

TOP

Related Classes of java.sql.SQLTimeoutException

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.