aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/SearchResultTest.java
blob: 8fcd18886d56408cbd36ea15bb9c897111b26221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package cgeo.geocaching;

import android.test.AndroidTestCase;

import java.util.HashSet;

public class SearchResultTest extends AndroidTestCase {
    public static void testCreateFromGeocodes() {
        final HashSet<String> geocodes = new HashSet<String>();
        geocodes.add("GC12345");
        geocodes.add("GC23456");
        final SearchResult searchResult = new SearchResult(geocodes);
        assertEquals(2, searchResult.getCount());
        assertEquals(2, searchResult.getTotal());
        assertTrue(searchResult.getGeocodes().contains("GC12345"));
    }
}