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
14 changes: 10 additions & 4 deletions src/test/java/com/uwetrottmann/trakt5/services/SyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<BaseMovie> movies = executeCall(getTrakt().sync().collectionMovies(1, 1000, Extended.METADATA));
assertSyncMovies(movies, "collection");
Response<List<BaseMovie>> 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<BaseShow> shows = executeCall(getTrakt().sync().collectionShows(1, 1000, Extended.METADATA));
assertSyncShows(shows, "collection");
Response<List<BaseShow>> response = executeCallWithoutReadingBody(
getTrakt().sync().collectionShows(PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, Extended.METADATA));

assertListPaginationHeaders(response);
assertSyncShows(response.body(), "collection");
}

@Test
Expand Down
15 changes: 10 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,20 @@ 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");
Response<List<BaseMovie>> 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<BaseShow> shows = executeCall(getTrakt().users().collectionShows(TestData.USER_SLUG, 1, 1000, null));
assertSyncShows(shows, "collection");
Response<List<BaseShow>> response = executeCallWithoutReadingBody(
getTrakt().users().collectionShows(TestData.USER_SLUG, PAGE_ONE, LIST_AND_COLLECTION_MAX_LIMIT, null));

assertListPaginationHeaders(response);
assertSyncShows(response.body(), "collection");
}

@Test
Expand Down