Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active Jun 8, 2022
Embed
What would you like to do?
@Test
void listWithQueryParams() {
List<CategoryEntity> category = given()
.when()
.get("v1/categories?page=2&size=4&sort_by=id")
.then()
.statusCode(Response.Status.OK.getStatusCode())
.extract()
.as(new TypeRef<>() {});
Assertions.assertEquals(category.size(), 4);
Assertions.assertEquals(category.get(0).id, 5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment