use of org.odk.collect.android.preferences.utilities.FormUpdateMode in project collect by opendatakit.
the class SettingsUtilsTest method getFormUpdateMode_whenProtocolIsGoogleDrive_andModeNotManual_returnsManual.
@Test
public void getFormUpdateMode_whenProtocolIsGoogleDrive_andModeNotManual_returnsManual() {
Settings generalSettings = TestSettingsProvider.getUnprotectedSettings();
Context context = getApplicationContext();
generalSettings.save(ProjectKeys.KEY_PROTOCOL, ProjectKeys.PROTOCOL_GOOGLE_SHEETS);
generalSettings.save(ProjectKeys.KEY_FORM_UPDATE_MODE, FormUpdateMode.PREVIOUSLY_DOWNLOADED_ONLY.getValue(context));
FormUpdateMode formUpdateMode = SettingsUtils.getFormUpdateMode(context, generalSettings);
assertThat(formUpdateMode, is(FormUpdateMode.MANUAL));
}
Aggregations