diff --git a/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java b/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java index 6859aef8..80c40fef 100644 --- a/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java +++ b/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java @@ -189,16 +189,22 @@ private void assertLastActivityUpdated(LastActivityUpdated activity) { public void test_collectionMovies() throws IOException { // Get metadata to assert it can be parsed. // On the test account, Star Wars: The Force Awakens has all properties set. - List movies = executeCall(getTrakt().sync().collectionMovies(1, 1000, Extended.METADATA)); - assertSyncMovies(movies, "collection"); + Response> response = executeCallWithoutReadingBody( + getTrakt().sync().collectionMovies(PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, Extended.METADATA)); + + assertListPaginationHeaders(response); + assertSyncMovies(response.body(), "collection"); } @Test public void test_collectionShows() throws IOException { // Get metadata to assert it can be parsed. // On the test account, episode 1x08 of Start Trek: Starfleet Academy has all properties set. - List shows = executeCall(getTrakt().sync().collectionShows(1, 1000, Extended.METADATA)); - assertSyncShows(shows, "collection"); + Response> response = executeCallWithoutReadingBody( + getTrakt().sync().collectionShows(PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, Extended.METADATA)); + + assertListPaginationHeaders(response); + assertSyncShows(response.body(), "collection"); } @Test diff --git a/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java b/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java index aec161cf..4c8f21f6 100644 --- a/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java +++ b/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java @@ -104,15 +104,20 @@ public void test_profile() throws IOException { @Test public void test_collectionMovies() throws IOException { - List movies = executeCall( - getTrakt().users().collectionMovies(TestData.USER_SLUG, 1, 1000, null)); - assertSyncMovies(movies, "collection"); + Response> response = executeCallWithoutReadingBody( + getTrakt().users().collectionMovies(TestData.USER_SLUG, PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, null)); + + assertListPaginationHeaders(response); + assertSyncMovies(response.body(), "collection"); } @Test public void test_collectionShows() throws IOException { - List shows = executeCall(getTrakt().users().collectionShows(TestData.USER_SLUG, 1, 1000, null)); - assertSyncShows(shows, "collection"); + Response> response = executeCallWithoutReadingBody( + getTrakt().users().collectionShows(TestData.USER_SLUG, PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, null)); + + assertListPaginationHeaders(response); + assertSyncShows(response.body(), "collection"); } @Test