Code example for Address

Methods: hasLatitude, hasLongitude

0
        Address address = geocoder.getFromLocationName("731 Market St, San Francisco, CA 94103", 1).get(0);
        assertTrue(address.hasLatitude());
        assertTrue(address.hasLongitude());
        shadowOf(geocoder).setSimulatedHasLatLong(false, false);
        address = geocoder.getFromLocationName("731 Market St, San Francisco, CA 94103", 1).get(0);
        assertFalse(address.hasLatitude());
        assertFalse(address.hasLongitude());
    } 
 
    @Test 
    public void canReturnNoAddressesOnRequest() throws Exception { 
        shadowOf(geocoder).setReturnNoResults(true);
        List<Address> result = geocoder.getFromLocationName("731 Market St, San Francisco, CA 94103", 1);
        assertEquals(0, result.size());
    } 
 
 
    @Test 
    public void answersWhetherResolutionHappened() throws Exception { 
        assertFalse(shadowOf(geocoder).didResolution());
        shadowOf(geocoder).setReturnNoResults(true);