SharedPreferencesHelper function ( ) { when ( mMockBrokenEditor . commit ( ) ) . thenReturn ( false ) ; when ( mMockBrokenSharedPreferences . edit ( ) ) . thenReturn ( mMockBrokenEditor ) ; return new SharedPreferencesHelper ( mMockBrokenSharedPreferences ) ; }
creates a mocked sharedpreferences that fails when writing . concode_field_sep SharedPreferencesHelper mMockBrokenSharedPreferencesHelper concode_elem_sep SharedPreferences.Editor mMockBrokenEditor concode_elem_sep SharedPreferencesHelper mMockSharedPreferencesHelper concode_elem_sep String TEST_NAME concode_elem_sep SharedPreferences.Editor mMockEditor concode_elem_sep SharedPreferenceEntry mSharedPreferenceEntry concode_elem_sep String TEST_EMAIL concode_elem_sep SharedPreferences mMockBrokenSharedPreferences concode_elem_sep Calendar TEST_DATE_OF_BIRTH concode_elem_sep SharedPreferences mMockSharedPreferences concode_field_sep void sharedPreferencesHelper_SaveAndReadPersonalInformation concode_elem_sep void sharedPreferencesHelper_SavePersonalInformationFailed_ReturnsFalse concode_elem_sep SharedPreferencesHelper createMockSharedPreference concode_elem_sep void initMocks