Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,24 @@ private void assertLastActivityUpdated(LastActivityUpdated activity) {

@Test
public void test_collectionMovies() throws IOException {
List<BaseMovie> movies = executeCall(getTrakt().sync().collectionMovies(1, 1000, null));
assertSyncMovies(movies, "collection");
int page = 1;
int limit = 1000;
Response<List<BaseMovie>> response = executeCallWithoutReadingBody(
getTrakt().sync().collectionMovies(page, limit, null));

assertPaginationHeaders(response, page, limit);
assertSyncMovies(response.body(), "collection");
}

@Test
public void test_collectionShows() throws IOException {
List<BaseShow> shows = executeCall(getTrakt().sync().collectionShows(1, 1000, null));
assertSyncShows(shows, "collection");
int page = 1;
int limit = 1000;
Response<List<BaseShow>> response = executeCallWithoutReadingBody(
getTrakt().sync().collectionShows(page, limit, null));

assertPaginationHeaders(response, page, limit);
assertSyncShows(response.body(), "collection");
}

@Test
Expand Down
19 changes: 14 additions & 5 deletions src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,24 @@ public void test_profile() throws IOException {

@Test
public void test_collectionMovies() throws IOException {
List<BaseMovie> movies = executeCall(
getTrakt().users().collectionMovies(TestData.USER_SLUG, 1, 1000, null));
assertSyncMovies(movies, "collection");
int page = 1;
int limit = 1000;
Response<List<BaseMovie>> response = executeCallWithoutReadingBody(
getTrakt().users().collectionMovies(TestData.USER_SLUG, page, limit, null));

assertPaginationHeaders(response, page, limit);
assertSyncMovies(response.body(), "collection");
}

@Test
public void test_collectionShows() throws IOException {
List<BaseShow> shows = executeCall(getTrakt().users().collectionShows(TestData.USER_SLUG, 1, 1000, null));
assertSyncShows(shows, "collection");
int page = 1;
int limit = 1000;
Response<List<BaseShow>> response = executeCallWithoutReadingBody(
getTrakt().users().collectionShows(TestData.USER_SLUG, page, limit, null));

assertPaginationHeaders(response, page, limit);
assertSyncShows(response.body(), "collection");
}

@Test
Expand Down