Skip to content

Conversation

dvohra16
Copy link
Contributor

No description provided.

Copy link
Collaborator

@KevinGilmore KevinGilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See notes and remove the comment lines noted.

import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List; // ADDED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

import com.baeldung.restassured.model.Movie;
import com.baeldung.restassured.service.AppService;

import io.restassured.common.mapper.TypeRef; // NEW IMPORT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

assertThat(movies.length).isEqualTo(2);
}

// NEW TEST CASE ADDED HERE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

List<Movie> movies = get(uri + "/movies").then()
.statusCode(200)
.extract()
// Use TypeRef to correctly deserialize JSON array into a List<POJO>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is fine because it gives the context of why we're doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants