aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/CGeoTestCase.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-21 17:36:46 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-21 17:48:57 +0200
commit1d1bcd7661e11ef079d8b23f9c531397e835ba3b (patch)
tree56613355a920e1909e9b55df59c4daaa6fadfb67 /tests/src/cgeo/CGeoTestCase.java
parenta8d6189ae5b172388605ab4ce30bcd1fad05eff7 (diff)
downloadcgeo-1d1bcd7661e11ef079d8b23f9c531397e835ba3b.zip
cgeo-1d1bcd7661e11ef079d8b23f9c531397e835ba3b.tar.gz
cgeo-1d1bcd7661e11ef079d8b23f9c531397e835ba3b.tar.bz2
Make sure a cgeoapplication is created before testing
Some tests are using cgeoapplication without having one already setup, and may be subject to race conditions when accessing the singleton or the Settings.
Diffstat (limited to 'tests/src/cgeo/CGeoTestCase.java')
-rw-r--r--tests/src/cgeo/CGeoTestCase.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/src/cgeo/CGeoTestCase.java b/tests/src/cgeo/CGeoTestCase.java
new file mode 100644
index 0000000..31fde34
--- /dev/null
+++ b/tests/src/cgeo/CGeoTestCase.java
@@ -0,0 +1,19 @@
+package cgeo;
+
+import cgeo.geocaching.cgeoapplication;
+
+import android.test.ApplicationTestCase;
+
+public abstract class CGeoTestCase extends ApplicationTestCase<cgeoapplication> {
+
+ public CGeoTestCase() {
+ super(cgeoapplication.class);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ createApplication();
+ }
+
+}