diff --git a/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java b/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java index 48c7a02b..b342c553 100644 --- a/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java +++ b/src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java @@ -186,14 +186,24 @@ private void assertLastActivityUpdated(LastActivityUpdated activity) { @Test public void test_collectionMovies() throws IOException { - List movies = executeCall(getTrakt().sync().collectionMovies(1, 1000, null)); - assertSyncMovies(movies, "collection"); + int page = 1; + int limit = 1000; + Response> response = executeCallWithoutReadingBody( + getTrakt().sync().collectionMovies(page, limit, null)); + + assertPaginationHeaders(response, page, limit); + assertSyncMovies(response.body(), "collection"); } @Test public void test_collectionShows() throws IOException { - List shows = executeCall(getTrakt().sync().collectionShows(1, 1000, null)); - assertSyncShows(shows, "collection"); + int page = 1; + int limit = 1000; + Response> response = executeCallWithoutReadingBody( + getTrakt().sync().collectionShows(page, limit, null)); + + assertPaginationHeaders(response, page, limit); + 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 6647483b..c5dfb7c6 100644 --- a/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java +++ b/src/test/java/com/uwetrottmann/trakt5/services/UsersTest.java @@ -104,15 +104,24 @@ 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"); + int page = 1; + int limit = 1000; + Response> 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 shows = executeCall(getTrakt().users().collectionShows(TestData.USER_SLUG, 1, 1000, null)); - assertSyncShows(shows, "collection"); + int page = 1; + int limit = 1000; + Response> response = executeCallWithoutReadingBody( + getTrakt().users().collectionShows(TestData.USER_SLUG, page, limit, null)); + + assertPaginationHeaders(response, page, limit); + assertSyncShows(response.body(), "collection"); } @Test