@Test public void isCheckingForUnopenedAtStartupReturnCorrectValueWhenSet() { when(prefs.getBoolean(Settings.PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true)).thenReturn(true); assertEquals(true, settings.isCheckingForUnopenedAtStartup()); verify(prefs, times(1)).getBoolean(Settings.PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); verifyNoMoreInteractions(prefs); }
public boolean isCheckingForUnopenedAtStartup() { return prefs.getBoolean(PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); }
Settings { public boolean isCheckingForUnopenedAtStartup() { return prefs.getBoolean(PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); } }
Settings { public boolean isCheckingForUnopenedAtStartup() { return prefs.getBoolean(PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); } Settings(Preferences prefs); }
Settings { public boolean isCheckingForUnopenedAtStartup() { return prefs.getBoolean(PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); } Settings(Preferences prefs); static Settings getDefaultSettings(); String getExerciseFilePath(); void setExerciseFilePath(String exerciseFilePath); String getServerBaseUrl(); void setServerBaseUrl(String serverBaseUrl); String getUsername(); void setUsername(String username); void setLoggedIn(boolean isloggedIn); boolean isLoggedIn(); String getPassword(); void setPassword(String password); String getCurrentCourseName(); void setCurrentCourseName(String currentCourseName); boolean isCheckingForUpdatesInTheBackground(); void setCheckingForUpdatesInTheBackground(boolean value); boolean isCheckingForUnopenedAtStartup(); void setCheckingForUnopenedAtStartup(boolean value); boolean isSpywareEnabled(); void setIsSpywareEnabled(boolean value); boolean isDetailedSpywareEnabled(); void setIsDetailedSpywareEnabled(boolean value); boolean isSavePassword(); void setSavePassword(boolean value); int getDefaultLocaleNum(); String[] getAvailableLocales(); boolean save(); Locale getErrorMsgLocale(); int getErrorMsgLocaleNum(); void setErrorMsgLocale(int localeNum); }
Settings { public boolean isCheckingForUnopenedAtStartup() { return prefs.getBoolean(PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP, true); } Settings(Preferences prefs); static Settings getDefaultSettings(); String getExerciseFilePath(); void setExerciseFilePath(String exerciseFilePath); String getServerBaseUrl(); void setServerBaseUrl(String serverBaseUrl); String getUsername(); void setUsername(String username); void setLoggedIn(boolean isloggedIn); boolean isLoggedIn(); String getPassword(); void setPassword(String password); String getCurrentCourseName(); void setCurrentCourseName(String currentCourseName); boolean isCheckingForUpdatesInTheBackground(); void setCheckingForUpdatesInTheBackground(boolean value); boolean isCheckingForUnopenedAtStartup(); void setCheckingForUnopenedAtStartup(boolean value); boolean isSpywareEnabled(); void setIsSpywareEnabled(boolean value); boolean isDetailedSpywareEnabled(); void setIsDetailedSpywareEnabled(boolean value); boolean isSavePassword(); void setSavePassword(boolean value); int getDefaultLocaleNum(); String[] getAvailableLocales(); boolean save(); Locale getErrorMsgLocale(); int getErrorMsgLocaleNum(); void setErrorMsgLocale(int localeNum); static final String PREF_KEY_TMC_SERVER_URL; static final String PREF_KEY_USERNAME; static final String PREF_KEY_PASSWORD; static final String PREF_KEY_CURRENT_COURSE; static final String PREF_KEY_EXERCISE_FILEPATH; static final String PREF_KEY_CHECK_FOR_UPDATES_IN_BACKGROUND; static final String PREF_KEY_CHECK_FOR_UNOPENED_AT_STARTUP; static final String PREF_KEY_SPYWARE_ENABLED; static final String PREF_KEY_DETAILED_SPYWARE_ENABLED; static final String PREF_ERROR_MSG_LOCALE; static final String[] AVAILABLE_LOCALES; static final int DEFAULT_LOCALE_NUM; static final String PREF_KEY_SAVE_PASSWORD; static final String PREF_KEY_IS_LOGGED_IN; }