Code example for SQLNonTransientConnectionException

Methods: getCause, getErrorCode, getMessage, getSQLState

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