From 3b40dd0067ceeefa1e9b48ab835008a4927e30ba Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski Date: Wed, 28 Apr 2021 18:08:18 +0200 Subject: [PATCH] Fixed imports in tests --- .../screens/AdminPreferencesActivityTest.java | 12 ++++++------ .../screens/MainMenuAccessPreferencesTest.java | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/collect_app/src/test/java/org/odk/collect/android/preferences/screens/AdminPreferencesActivityTest.java b/collect_app/src/test/java/org/odk/collect/android/preferences/screens/AdminPreferencesActivityTest.java index 5c73356aa39..b9f73d7953c 100644 --- a/collect_app/src/test/java/org/odk/collect/android/preferences/screens/AdminPreferencesActivityTest.java +++ b/collect_app/src/test/java/org/odk/collect/android/preferences/screens/AdminPreferencesActivityTest.java @@ -100,8 +100,8 @@ public void whenMainMenuPreferencesDisplayed_shouldIsInAdminModeReturnTrue() { adminPreferencesFragment.onPreferenceClick(preference); activityController.resume(); - AdminPreferencesFragment.MainMenuAccessPreferences preferences - = (AdminPreferencesFragment.MainMenuAccessPreferences) activityController.get() + MainMenuAccessPreferencesFragment preferences + = (MainMenuAccessPreferencesFragment) activityController.get() .getSupportFragmentManager() .findFragmentById(R.id.preferences_fragment_container); @@ -116,8 +116,8 @@ public void whenUserPreferencesDisplayed_shouldIsInAdminModeReturnTrue() { adminPreferencesFragment.onPreferenceClick(preference); activityController.resume(); - AdminPreferencesFragment.UserSettingsAccessPreferences preferences - = (AdminPreferencesFragment.UserSettingsAccessPreferences) activityController.get() + UserSettingsAccessPreferencesFragment preferences + = (UserSettingsAccessPreferencesFragment) activityController.get() .getSupportFragmentManager() .findFragmentById(R.id.preferences_fragment_container); @@ -132,8 +132,8 @@ public void whenFormEntryPreferencesDisplayed_shouldIsInAdminModeReturnTrue() { adminPreferencesFragment.onPreferenceClick(preference); activityController.resume(); - AdminPreferencesFragment.FormEntryAccessPreferences preferences - = (AdminPreferencesFragment.FormEntryAccessPreferences) activityController.get() + FormEntryAccessPreferencesFragment preferences + = (FormEntryAccessPreferencesFragment) activityController.get() .getSupportFragmentManager() .findFragmentById(R.id.preferences_fragment_container); diff --git a/collect_app/src/test/java/org/odk/collect/android/preferences/screens/MainMenuAccessPreferencesTest.java b/collect_app/src/test/java/org/odk/collect/android/preferences/screens/MainMenuAccessPreferencesTest.java index fcc598bba85..ef80f2161db 100644 --- a/collect_app/src/test/java/org/odk/collect/android/preferences/screens/MainMenuAccessPreferencesTest.java +++ b/collect_app/src/test/java/org/odk/collect/android/preferences/screens/MainMenuAccessPreferencesTest.java @@ -15,7 +15,6 @@ import org.odk.collect.android.preferences.keys.GeneralKeys; import org.odk.collect.shared.Settings; import org.odk.collect.android.preferences.Protocol; -import org.odk.collect.android.preferences.screens.AdminPreferencesFragment.MainMenuAccessPreferences; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; @@ -41,7 +40,7 @@ public void setup() { public void whenMatchExactlyEnabled_showsGetBlankFormAsUncheckedAndDisabled() { generalSettings.save(GeneralKeys.KEY_FORM_UPDATE_MODE, FormUpdateMode.MATCH_EXACTLY.getValue(context)); - FragmentScenario scenario = FragmentScenario.launch(MainMenuAccessPreferences.class); + FragmentScenario scenario = FragmentScenario.launch(MainMenuAccessPreferencesFragment.class); scenario.onFragment(f -> { CheckBoxPreference getBlankForm = f.findPreference(KEY_GET_BLANK); assertThat(getBlankForm.isEnabled(), is(false)); @@ -55,7 +54,7 @@ public void whenMatchExactlyEnabled_andGoogleUsedAsProtocol_getBlankFormIsEnable generalSettings.save(GeneralKeys.KEY_FORM_UPDATE_MODE, FormUpdateMode.MATCH_EXACTLY.getValue(context)); generalSettings.save(GeneralKeys.KEY_PROTOCOL, Protocol.GOOGLE.getValue(context)); - FragmentScenario scenario = FragmentScenario.launch(MainMenuAccessPreferences.class); + FragmentScenario scenario = FragmentScenario.launch(MainMenuAccessPreferencesFragment.class); scenario.onFragment(f -> { CheckBoxPreference getBlankForm = f.findPreference(KEY_GET_BLANK); assertThat(getBlankForm.isEnabled(), is(true));