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.java4
-rw-r--r--tests/src/cgeo/geocaching/test/RegExPerformanceTest.java2
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
index 0d3d53b..cd8b5e7 100644
--- a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
+++ b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
@@ -1,6 +1,6 @@
package cgeo.geocaching.test;
-import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.cgData;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.LoadFlags.RemoveFlag;
@@ -18,7 +18,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);
- cgeoapplication.getInstance().removeCache(geocode, flags);
+ cgData.removeCache(geocode, flags);
}
protected InputStream getResourceStream(int resourceId) {
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
index b9f8138..5e46445 100644
--- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
@@ -124,7 +124,7 @@ public class RegExPerformanceTest extends TestCase {
for (int j = 0; j < iterations; j++) {
BaseUtils.getMatch(page, pattern, true, "");
}
- return (System.currentTimeMillis() - start);
+ return System.currentTimeMillis() - start;
}
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index 352c34d..8517c81 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -70,7 +70,7 @@ public abstract class MockedCache implements ICache {
return BaseUtils.replaceWhitespace(buffer.toString());
} catch (IOException e) {
- e.printStackTrace();
+ Assert.fail(e.getMessage());
} finally {
IOUtils.closeQuietly(is);
IOUtils.closeQuietly(br);