Code example for SQLNonTransientConnectionException

Methods: getCause, getErrorCode, getMessage, getSQLState

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