@Test public void shouldCorrectlyDetermineIfUpgradeIsRequired() throws Exception { assertTrue(testUpgrades.isUpgradeRequired(-1)); assertTrue(testUpgrades.isUpgradeRequired(0)); assertTrue(testUpgrades.isUpgradeRequired(1)); assertTrue(testUpgrades.isUpgradeRequired(2)); assertTrue(testUpgrades.isUpgradeRequired(3)); assertFalse(testUpgrades.isUpgradeRequired(4)); assertFalse(testUpgrades.isUpgradeRequired(5)); }
public final boolean isUpgradeRequired( int lastId ) { return getLatestAvailableUpgradeId() > lastId; }
Upgrades { public final boolean isUpgradeRequired( int lastId ) { return getLatestAvailableUpgradeId() > lastId; } }
Upgrades { public final boolean isUpgradeRequired( int lastId ) { return getLatestAvailableUpgradeId() > lastId; } protected  Upgrades( UpgradeOperation... operations ); }
Upgrades { public final boolean isUpgradeRequired( int lastId ) { return getLatestAvailableUpgradeId() > lastId; } protected  Upgrades( UpgradeOperation... operations ); final int applyUpgradesSince( int lastId,
                                         Context resources ); final boolean isUpgradeRequired( int lastId ); final int getLatestAvailableUpgradeId(); }
Upgrades { public final boolean isUpgradeRequired( int lastId ) { return getLatestAvailableUpgradeId() > lastId; } protected  Upgrades( UpgradeOperation... operations ); final int applyUpgradesSince( int lastId,
                                         Context resources ); final boolean isUpgradeRequired( int lastId ); final int getLatestAvailableUpgradeId(); static final Upgrades STANDARD_UPGRADES; }