FileDocCategorySizeDatePackage
CountryTester.javaAPI DocAndroid 5.1 API1373Thu Mar 12 22:22:30 GMT 2015android.location

CountryTester

public class CountryTester extends android.test.AndroidTestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestCountryEquals()

        Country countryA = new Country("US", Country.COUNTRY_SOURCE_NETWORK);
        Country countryB = new Country("US", Country.COUNTRY_SOURCE_LOCALE);
        Country countryC = new Country("CN", Country.COUNTRY_SOURCE_LOCALE);
        Country countryD = new Country("us", Country.COUNTRY_SOURCE_NETWORK);
        assertTrue(countryA.equalsIgnoreSource(countryB));
        assertFalse(countryA.equalsIgnoreSource(countryC));
        assertFalse(countryA.equals(countryC));
        assertTrue(countryA.equals(countryD));
        assertTrue(countryA.hashCode() == countryD.hashCode());