Code example for SQLFeatureNotSupportedException

Methods: getCause, getErrorCode, getMessage, getSQLState

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