aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/settings/TestSettings.java
blob: 279f658209d13a142d539c4cda46d43f26f6fb3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package cgeo.geocaching.settings;

import cgeo.geocaching.R;


/**
 * provide write-access proxy to settings for testing purposes
 *
 */
public final class TestSettings extends Settings {

    /**
     * Purely static!
     */
    private TestSettings() {
        throw new InstantiationError();
    }

    public static void setExcludeDisabledCaches(final boolean exclude) {
        putBoolean(R.string.pref_excludedisabled, exclude);
    }

    public static void setExcludeMine(final boolean exclude) {
        putBoolean(R.string.pref_excludemine, exclude);
    }

    public static void setLogin(final String username, final String password) {
        Settings.setLogin(username, password);
    }

    public static void setStoreOfflineMaps(final boolean offlineMaps) {
        putBoolean(R.string.pref_offlinemaps, offlineMaps);
    }

    public static void setStoreOfflineWpMaps(final boolean offlineWpMaps) {
        putBoolean(R.string.pref_offlinewpmaps, offlineWpMaps);
    }

    public static void setUseImperialUnits(final boolean imperial) {
        putBoolean(R.string.pref_units, imperial);
    }

    public static void setCacheTwitterMessage(final String template) {
        putString(R.string.pref_twitter_cache_message, template);
    }

    public static void setTrackableTwitterMessage(final String template) {
        putString(R.string.pref_twitter_trackable_message, template);
    }

    public static void setSignature(final String signature) {
        putString(R.string.pref_signature, signature);
    }

}