Code example for SQLNonTransientConnectionException

Methods: getCausegetMessagegetErrorCodegetSQLState

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