aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/test')
-rw-r--r--tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java9
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC2CJPF.java2
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java1
3 files changed, 10 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
index df8dc1f..eaac181 100644
--- a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
+++ b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
@@ -12,7 +12,9 @@ import cgeo.geocaching.files.GPX10Parser;
import cgeo.geocaching.files.ParserException;
import cgeo.geocaching.list.StoredList;
+import android.content.ContentResolver;
import android.content.res.Resources;
+import android.net.Uri;
import android.test.InstrumentationTestCase;
import java.io.File;
@@ -28,7 +30,7 @@ public abstract class AbstractResourceInstrumentationTestCase extends Instrument
protected static void removeCacheCompletely(final String geocode) {
final EnumSet<RemoveFlag> flags = EnumSet.copyOf(LoadFlags.REMOVE_ALL);
- flags.add(RemoveFlag.REMOVE_OWN_WAYPOINTS_ONLY_FOR_TESTING);
+ flags.add(RemoveFlag.OWN_WAYPOINTS_ONLY_FOR_TESTING);
DataStore.removeCache(geocode, flags);
}
@@ -102,4 +104,9 @@ public abstract class AbstractResourceInstrumentationTestCase extends Instrument
instream.close();
}
}
+
+ protected Uri getResourceURI(int resId) {
+ Resources resources = getInstrumentation().getContext().getResources();
+ return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId));
+ }
}
diff --git a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
index c125422..3fe105d 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
@@ -66,7 +66,7 @@ public class GC2CJPF extends MockedCache {
@Override
public String getDescription() {
- return "Kleiner Multi über 7 Stationen";
+ return "<a href=\"http://www.kinderwald.de/\"><b>http://www.kinderwald.de/</b></a><br/><br/>Kleiner Multi über 7 Stationen";
}
@Override
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index d06e715..cd482f8 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -150,6 +150,7 @@ public abstract class MockedCache implements ICache {
return getName();
}
+ @Override
public Geopoint getCoords() {
return coords;
}