@Test public void apply() throws Exception { new Migration("INSERT INTO test (value) VALUES (42);").apply(database); final Cursor cursor = database.rawQuery("SELECT value FROM test", new String[0]); Assert.assertTrue("moveToFirst", cursor.moveToFirst()); Assert.assertEquals(cursor.getInt(0), 42); cursor.close(); }
void apply(@NonNull final SQLiteDatabase database) throws MigrationException { database.execSQL(statement); }
Migration { void apply(@NonNull final SQLiteDatabase database) throws MigrationException { database.execSQL(statement); } }
Migration { void apply(@NonNull final SQLiteDatabase database) throws MigrationException { database.execSQL(statement); } Migration(@NonNull final String statement); }
Migration { void apply(@NonNull final SQLiteDatabase database) throws MigrationException { database.execSQL(statement); } Migration(@NonNull final String statement);  }
Migration { void apply(@NonNull final SQLiteDatabase database) throws MigrationException { database.execSQL(statement); } Migration(@NonNull final String statement);   }