Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active June 8, 2022 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/c77e98144bcc14149a244ec894772a63 to your computer and use it in GitHub Desktop.
Save garystafford/c77e98144bcc14149a244ec894772a63 to your computer and use it in GitHub Desktop.
@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