src/test/java/de/blau/android/prefs/PreferenceTest.java
/**
     * Test if we can set and read a Preference
     */
Test if we can set and read a Preference
Test if we can set and read a Preference
@Test
    public void preferences() {
        Preferences prefs = new Preferences(ApplicationProvider.getApplicationContext());
        Assert.assertNull(prefs.getString(R.string.config_gpxPreferredDir_key));
        prefs.putString(R.string.config_gpxPreferredDir_key, "test");
        Assert.assertEquals("test", prefs.getString(R.string.config_gpxPreferredDir_key));
        Assert.assertNull(prefs.getString(-1));
    }
@ Test public void preferences ( ) { Preferences prefs = new Preferences ( ApplicationProvider . getApplicationContext ( ) ) ; Assert . assertNull ( prefs . getString ( R . string . config_gpxPreferredDir_key ) ) ; prefs . putString ( R . string . config_gpxPreferredDir_key , "test" ) ; Assert . assertEquals ( "test" , prefs . getString ( R . string . config_gpxPreferredDir_key ) ) ; Assert . assertNull ( prefs . getString ( - 1 ) ) ; }
Test if we can set and read a Preference
Test if we can set and read a Preference