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/RegExPerformanceTest.java8
-rw-r--r--tests/src/cgeo/geocaching/test/WhitespaceTest.java4
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java6
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
index d71f489..03ca18f 100644
--- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
@@ -5,7 +5,7 @@ import cgeo.geocaching.test.mock.GC2CJPF;
import cgeo.geocaching.test.mock.GC2JVEH;
import cgeo.geocaching.test.mock.GC3XX5J;
import cgeo.geocaching.test.mock.MockedCache;
-import cgeo.geocaching.utils.BaseUtils;
+import cgeo.geocaching.utils.TextUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -98,8 +98,8 @@ public class RegExPerformanceTest extends TestCase {
for (MockedCache cache : MOCKED_CACHES) {
String page = cache.getData();
- String result1 = BaseUtils.getMatch(page, p1, true, "");
- String result2 = BaseUtils.getMatch(page, p2, true, "");
+ String result1 = TextUtils.getMatch(page, p1, true, "");
+ String result2 = TextUtils.getMatch(page, p2, true, "");
assertEquals(result1, result2);
long diff1, diff2;
@@ -123,7 +123,7 @@ public class RegExPerformanceTest extends TestCase {
private static long parse(String page, Pattern pattern, int iterations) {
final long start = System.currentTimeMillis();
for (int j = 0; j < iterations; j++) {
- BaseUtils.getMatch(page, pattern, true, "");
+ TextUtils.getMatch(page, pattern, true, "");
}
return System.currentTimeMillis() - start;
diff --git a/tests/src/cgeo/geocaching/test/WhitespaceTest.java b/tests/src/cgeo/geocaching/test/WhitespaceTest.java
index 5e792d9..125a0cb 100644
--- a/tests/src/cgeo/geocaching/test/WhitespaceTest.java
+++ b/tests/src/cgeo/geocaching/test/WhitespaceTest.java
@@ -1,6 +1,6 @@
package cgeo.geocaching.test;
-import cgeo.geocaching.utils.BaseUtils;
+import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
@@ -76,7 +76,7 @@ public class WhitespaceTest extends AbstractResourceInstrumentationTestCase {
public void testActualImplementation() {
final String result;
final long start = System.currentTimeMillis();
- result = BaseUtils.replaceWhitespace(data);
+ result = TextUtils.replaceWhitespace(data);
final long end = System.currentTimeMillis();
assertEquals(EXPECTED_SIZE, result.length());
Log.d((end - start) + " ms actual implementation");
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index 7ad566a..0085a18 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -5,7 +5,7 @@ import cgeo.geocaching.Image;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.connector.gc.GCConstants;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.utils.BaseUtils;
+import cgeo.geocaching.utils.TextUtils;
import org.apache.commons.lang3.StringUtils;
import org.mapsforge.core.IOUtils;
@@ -28,7 +28,7 @@ public abstract class MockedCache implements ICache {
this.coords = coords;
this.data = MockedCache.readCachePage(getGeocode());
// for mocked caches the user logged in is the user who saved the html file(s)
- this.mockedDataUser = BaseUtils.getMatch(data, GCConstants.PATTERN_LOGIN_NAME, true, "");
+ this.mockedDataUser = TextUtils.getMatch(data, GCConstants.PATTERN_LOGIN_NAME, true, "");
}
public String getMockedDataUser() {
@@ -68,7 +68,7 @@ public abstract class MockedCache implements ICache {
buffer.append(line).append('\n');
}
- return BaseUtils.replaceWhitespace(buffer.toString());
+ return TextUtils.replaceWhitespace(buffer.toString());
} catch (IOException e) {
Assert.fail(e.getMessage());
} finally {