Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mraible committed Oct 28, 2024
1 parent af31415 commit c5df83a
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ void multiplePagesTest() {
assertThat(strHeaders).hasSize(1);
headerData = strHeaders.get(0);
assertThat(headerData.split(",")).hasSize(4);
expectedData = "</api/_search/example?query=Test1%2C%20test2&page=2&size=50>; rel=\"next\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
expectedData =
"</api/_search/example?query=Test1%2C%20test2&page=2&size=50>; rel=\"next\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
assertThat(headerData).isEqualTo(expectedData);
xTotalCountHeaders = headers.get("X-Total-Count");
assertThat(xTotalCountHeaders).hasSize(1).extracting(Long::parseLong).containsExactly(400L);
Expand All @@ -131,10 +132,11 @@ void multiplePagesTest() {
assertThat(strHeaders).hasSize(1);
headerData = strHeaders.get(0);
assertThat(headerData.split(",")).hasSize(4);
expectedData = "</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"next\"," +
"</api/_search/example?query=Test1%2C%20test2&page=5&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
expectedData =
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"next\"," +
"</api/_search/example?query=Test1%2C%20test2&page=5&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
assertThat(headerData).isEqualTo(expectedData);
xTotalCountHeaders = headers.get("X-Total-Count");
assertThat(xTotalCountHeaders).hasSize(1).extracting(Long::parseLong).containsExactly(400L);
Expand All @@ -148,9 +150,10 @@ void multiplePagesTest() {
assertThat(strHeaders).hasSize(1);
headerData = strHeaders.get(0);
assertThat(headerData.split(",")).hasSize(3);
expectedData = "</api/_search/example?query=Test1%2C%20test2&page=6&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
expectedData =
"</api/_search/example?query=Test1%2C%20test2&page=6&size=50>; rel=\"prev\"," +
"</api/_search/example?query=Test1%2C%20test2&page=7&size=50>; rel=\"last\"," +
"</api/_search/example?query=Test1%2C%20test2&page=0&size=50>; rel=\"first\"";
assertThat(headerData).isEqualTo(expectedData);
}

Expand Down

0 comments on commit c5df83a

Please sign in to comment.