Code example for SQLiteOpenHelper

Methods: close

0
        _openHelper = createSQLiteOpenHelper(_openHelperContext);
    } 
 
    @Override 
    protected void tearDown() throws Exception { 
        _openHelper.close();
        super.tearDown(); 
    } 
 
    /** 
     * @return Returns the actual SQLiteOpenHelper under test. 
     */ 
    public T getSQLiteOpenHelper() { 
        return _openHelper;
    } 
 
    protected T createSQLiteOpenHelper(Context context) throws Exception {
        return _openHelperClass.getConstructor(Context.class)
                               .newInstance(_openHelperContext);
    }