Code example for SQLTimeoutException

Methods: getCausegetMessagegetErrorCodegetSQLState

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