Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@RunWith(AndroidJUnit4.class)
public class GooglePlacesApiTest {
GoogleApiClient apiClient;
@Before public void setup() throws InterruptedException {
Context context = InstrumentationRegistery.getContext();
apiClient = new GoogleApiClient.Builder(context)
.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
.build();
apiClient.connect();
}
@Test public void apiClientShouldConnectSuccessfully() {
assertThat(apiClient.isConnected()).isTrue();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.