From 1d1bcd7661e11ef079d8b23f9c531397e835ba3b Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sat, 21 Apr 2012 17:36:46 +0200 Subject: 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. --- tests/src/cgeo/CGeoTestCase.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/src/cgeo/CGeoTestCase.java (limited to 'tests/src/cgeo/CGeoTestCase.java') 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 { + + public CGeoTestCase() { + super(cgeoapplication.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + createApplication(); + } + +} -- cgit v1.1