blob: 29fd886a017b31ce0108840ca24b29064135a016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package cgeo.geocaching.connector.gc;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.test.mock.GC2CJPF;
import cgeo.geocaching.test.mock.MockedCache;
import cgeo.test.Compare;
import java.util.HashSet;
import java.util.Set;
import junit.framework.TestCase;
public class GCBaseTest extends TestCase {
public static void testSearchFromMap() {
final MockedCache mockedCache = new GC2CJPF();
final Set<String> geocodes = new HashSet<String>();
geocodes.add(mockedCache.getGeocode());
final SearchResult result = GCMap.searchByGeocodes(geocodes);
final Geocache parsedCache = result.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_ONLY);
Compare.assertCompareCaches(mockedCache, parsedCache, false);
}
}
|