aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2012-12-29 19:16:31 +0100
committerBananeweizen <Bananeweizen@gmx.de>2012-12-30 09:50:35 +0100
commitcb94f1f020596be019cc4c000a93a318600d7f37 (patch)
tree42708485b581bc243dcc9a89f49680e9296a3599 /tests/src/cgeo
parent8ab924a6c016c0129cccaffa546a896892f36dcc (diff)
downloadcgeo-cb94f1f020596be019cc4c000a93a318600d7f37.zip
cgeo-cb94f1f020596be019cc4c000a93a318600d7f37.tar.gz
cgeo-cb94f1f020596be019cc4c000a93a318600d7f37.tar.bz2
refactoring: findbugs
Diffstat (limited to 'tests/src/cgeo')
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCParserTest.java2
-rw-r--r--tests/src/cgeo/geocaching/test/RegExPerformanceTest.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
index dd71302..0f1f4cf 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
@@ -72,7 +72,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
}
private static cgCache createCache(int index) {
- final MockedCache mockedCache = RegExPerformanceTest.MOCKED_CACHES[index];
+ final MockedCache mockedCache = RegExPerformanceTest.MOCKED_CACHES.get(index);
// to get the same results we have to use the date format used when the mocked data was created
String oldCustomDate = Settings.getGcCustomDate();
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
index 5e46445..bd30532 100644
--- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
@@ -8,6 +8,7 @@ import cgeo.geocaching.test.mock.MockedCache;
import cgeo.geocaching.utils.BaseUtils;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
@@ -69,7 +70,10 @@ public class RegExPerformanceTest extends TestCase {
public final static Pattern PATTERN_DESCRIPTION = Pattern.compile("<span id=\"ctl00_ContentBody_LongDescription\">(.*?)</span>[^<]*</div>[^<]*<p>[^<]*</p>[^<]*<p>[^<]*<strong>\\W*Additional Hints</strong>");
- public final static MockedCache[] MOCKED_CACHES = { new GC2CJPF(), new GC1ZXX2(), new GC2JVEH(), new GC3XX5J() };
+ public final static List<MockedCache> MOCKED_CACHES;
+ static {
+ MOCKED_CACHES = Arrays.asList(new GC2CJPF(), new GC1ZXX2(), new GC2JVEH(), new GC3XX5J());
+ }
public static void testRegEx() {
List<String> output = doTheTests(10);