@Test public void loadVersions() throws IOException, JSONException { loadFakeVersions(200, true); List<HockeyAppVersion> versions = client.getVersions(); HockeyAppVersion version = versions.get(0); assertEquals(2, versions.size()); assertEquals(VERSION_1_0, version.shortVersion); assertEquals(VERSION_1_0, version.shortVersion); }
List<HockeyAppVersion> loadVersions() throws IOException, JSONException { HttpGet httpGet = requestBuilder.prepareGetRequest(API_VERSIONS_ALL); HttpResponse response = requestBuilder.getHttpClient().execute(httpGet); String responseContent = EntityUtils.toString(response.getEntity()); return parseVersionsResponse(responseContent); }
VersionClient { List<HockeyAppVersion> loadVersions() throws IOException, JSONException { HttpGet httpGet = requestBuilder.prepareGetRequest(API_VERSIONS_ALL); HttpResponse response = requestBuilder.getHttpClient().execute(httpGet); String responseContent = EntityUtils.toString(response.getEntity()); return parseVersionsResponse(responseContent); } }
VersionClient { List<HockeyAppVersion> loadVersions() throws IOException, JSONException { HttpGet httpGet = requestBuilder.prepareGetRequest(API_VERSIONS_ALL); HttpResponse response = requestBuilder.getHttpClient().execute(httpGet); String responseContent = EntityUtils.toString(response.getEntity()); return parseVersionsResponse(responseContent); } VersionClient(HockeyAppRequestBuilder requestBuilder); }
VersionClient { List<HockeyAppVersion> loadVersions() throws IOException, JSONException { HttpGet httpGet = requestBuilder.prepareGetRequest(API_VERSIONS_ALL); HttpResponse response = requestBuilder.getHttpClient().execute(httpGet); String responseContent = EntityUtils.toString(response.getEntity()); return parseVersionsResponse(responseContent); } VersionClient(HockeyAppRequestBuilder requestBuilder); HockeyAppVersion getVersion(); }
VersionClient { List<HockeyAppVersion> loadVersions() throws IOException, JSONException { HttpGet httpGet = requestBuilder.prepareGetRequest(API_VERSIONS_ALL); HttpResponse response = requestBuilder.getHttpClient().execute(httpGet); String responseContent = EntityUtils.toString(response.getEntity()); return parseVersionsResponse(responseContent); } VersionClient(HockeyAppRequestBuilder requestBuilder); HockeyAppVersion getVersion();  }