AllSettings { public void savePreviousFetchIndex(String value) { settingsRepository.updateSetting(PREVIOUS_FETCH_INDEX_SETTING_KEY, value); } AllSettings(AllSharedPreferences preferences, SettingsRepository settingsRepository); void registerANM(String userName, String password); void savePreviousFetchIndex(String value); String fetchPreviousFetchIndex(); void saveAppliedVillageFilter(String village); String appliedVillageFilter(String defaultFilterValue); String fetchANMPassword(); String fetchPreviousFormSyncIndex(); void savePreviousFormSyncIndex(String value); void saveANMLocation(String anmLocation); String fetchANMLocation(); static final String APPLIED_VILLAGE_FILTER_SETTING_KEY; static final String PREVIOUS_FETCH_INDEX_SETTING_KEY; static final String PREVIOUS_FORM_SYNC_INDEX_SETTING_KEY; }
@Test public void shouldSavePreviousFetchIndex() throws Exception { allSettings.savePreviousFetchIndex("1234"); verify(settingsRepository).updateSetting("previousFetchIndex", "1234"); }