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.java7
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
index df8dc1f..cbad794 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;
@@ -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/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;
}