Code example for Location

Methods: setLatitudesetLongitude

0
    @MediumTest 
    @LargeTest 
    public void testExecutePlaceRequestWithLocation() { 
        TestSession session = openTestSessionWithSharedUser();
 
        Location location = new Location("");
        location.setLatitude(47.6204);
        location.setLongitude(-122.3491);
 
        Request request = Request.newPlacesSearchRequest(session, location, 5, 5, null, null);
        Response response = request.executeAndWait();
        assertNotNull(response);
 
        assertNull(response.getError());
 
        GraphMultiResult graphResult = response.getGraphObjectAs(GraphMultiResult.class);
        assertNotNull(graphResult);
 
        List<GraphObject> results = graphResult.getData();
        assertNotNull(results);
    }