@Test public void countsTargets() { schema.runMigrations(0, 3); long expected = 50; for (int i = 0; i < expected; i++) { db.execSQL( "INSERT INTO targets (canonical_id, target_id) VALUES (?, ?)", new String[] {"foo" + i, "" + i}); } schema.runMigrations(3, 5); Cursor c = db.rawQuery("SELECT target_count FROM target_globals LIMIT 1", NO_ARGS); assertTrue(c.moveToFirst()); long targetCount = c.getInt(0); assertEquals(expected, targetCount); }
void runMigrations() { runMigrations(0, VERSION); }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer); }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer);  }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer);   }