aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/test/mock/GC2JVEH.java
blob: 77f078be3f61350d0c66e26ba61d312c01f15a9e (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
package cgeo.geocaching.test.mock;

import cgeo.geocaching.Image;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.connector.gc.GCLogin;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.location.Geopoint;

import org.eclipse.jdt.annotation.NonNull;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GC2JVEH extends MockedCache {

    @Override
    public String getName() {
        return "Auf den Spuren des Indianer Jones Teil 1";
    }

    public GC2JVEH() {
        super(new Geopoint(52.37225, 9.735367));
    }

    @Override
    public float getDifficulty() {
        return 5.0f;
    }

    @Override
    public float getTerrain() {
        return 3.0f;
    }

    @Override
    public String getGeocode() {
        return "GC2JVEH";
    }

    @Override
    public String getCacheId() {
        return "1997597";
    }

    @Override
    public String getGuid() {
        return "07270e8c-72ec-4821-8cb7-b01483f94cb5";
    }

    @Override
    public String getOwnerDisplayName() {
        return "indianerjones, der merlyn,reflektordetektor";
    }

    @NonNull
    @Override
    public String getOwnerUserId() {
        return "indianerjones";
    }

    @NonNull
    @Override
    public CacheSize getSize() {
        return CacheSize.SMALL;
    }

    @Override
    public CacheType getType() {
        return CacheType.MYSTERY;
    }

    @Override
    public String getShortDescription() {
        return "Aufgabe zum Start: Finde die Schattenlinie. !!!Die Skizze mit den Zahlen solltest du mitnehmen!!! Du solltest den cache so beginnen, das du station 2 in der Zeit von mo- fr von 11-19 Uhr und sa von 11-16 Uhr erledigt hast. Achtung: Damit ihr die Zahlenpause in druckbarer Größe sehen könnt müsst ihr über die Bildergalerie gehen nicht über den unten zu sehenden link.....";
    }

    @Override
    public String getDescription() {
        return "<img src=\"http://img.geocaching.com/cache/large/1711f8a1-796a-405b-82ba-8685f2e9f024.jpg\" />";
    }

    @Override
    public String getLocation() {
        return "Niedersachsen, Germany";
    }

    @Override
    public Date getHiddenDate() {
        try {
            return GCLogin.parseGcCustomDate("2010-11-28", getDateFormat());
        } catch (ParseException e) {
            // intentionally left blank
        }
        return null;
    }

    @NonNull
    @Override
    public List<String> getAttributes() {
        final String[] attributes = new String[] {
                "winter_yes",
                "flashlight_yes",
                "stealth_yes",
                "parking_yes",
                "abandonedbuilding_yes",
                "hike_med_yes",
                "rappelling_yes"
        };
        return new MockedLazyInitializedList<String>(attributes);
    }

    @Override
    public Map<LogType, Integer> getLogCounts() {
        final Map<LogType, Integer> logCounts = new HashMap<LogType, Integer>();
        logCounts.put(LogType.FOUND_IT, 101);
        logCounts.put(LogType.NOTE, 7);
        logCounts.put(LogType.TEMP_DISABLE_LISTING, 1);
        logCounts.put(LogType.ENABLE_LISTING, 1);
        logCounts.put(LogType.PUBLISH_LISTING, 1);
        return logCounts;
    }

    @Override
    public int getFavoritePoints() {
        return 23;
    }

    @Override
    public boolean isPremiumMembersOnly() {
        return true;
    }

    @Override
    public List<Trackable> getInventory() {
        final ArrayList<Trackable> inventory = new ArrayList<Trackable>();
        inventory.add(new Trackable());
        return inventory;
    }

    @Override
    public List<Image> getSpoilers() {
        final ArrayList<Image> spoilers = new ArrayList<Image>();
        final Image mockedImage = new Image(null, null, null);
        spoilers.add(mockedImage);
        spoilers.add(mockedImage);
        spoilers.add(mockedImage);
        return spoilers;
    }

    @Override
    public String getPersonalNote() {
        if ("blafoo".equals(this.getMockedDataUser())) {
            return "Selig";
        }
        return super.getPersonalNote();
    }

    @Override
    public boolean isFound() {
        if ("blafoo".equals(this.getMockedDataUser()) || "JoSaMaJa".equals(this.getMockedDataUser())) {
            return true;
        }
        return super.isFound();
    }

    @Override
    public boolean isFavorite() {
        if ("blafoo".equals(this.getMockedDataUser())) {
            return true;
        }
        return super.isFavorite();
    }

}