Code example for SQLInvalidAuthorizationSpecException

Methods: getCause, getErrorCode, getMessage, getSQLState

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