Code example for SQLFeatureNotSupportedException

Methods: getCause, getErrorCode, getMessage, getSQLState

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