Package java.sql

Examples of java.sql.SQLNonTransientConnectionException


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


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

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

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

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

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

public class SQLNonTransientConnectionExceptionTest extends TestCase {

    private SQLNonTransientConnectionException sQLNonTransientConnectionException;

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

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

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

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

TOP

Related Classes of java.sql.SQLNonTransientConnectionException

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.