Skip to content

Commit

Permalink
fix quality violations
Browse files Browse the repository at this point in the history
  • Loading branch information
uchitsa committed Dec 9, 2024
1 parent 0cbe0ab commit 723ad24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/com/jcabi/http/RequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ void sendsHttpRequestAndProcessesHttpResponse(
.assertStatus(HttpURLConnection.HTTP_OK);
final MkQuery query = container.take();
MatcherAssert.assertThat(
"should contains 'helloall'",
query,
MkQueryMatchers.hasPath(Matchers.containsString("helloall"))
);
MatcherAssert.assertThat(
"should be GET method",
query.method(),
Matchers.equalTo(Request.GET)
);
Expand Down Expand Up @@ -121,6 +123,7 @@ void sendsHttpRequestWithHeaders(
.assertStatus(HttpURLConnection.HTTP_OK);
final MkQuery query = container.take();
MatcherAssert.assertThat(
"should be accept '*' and user-agent 'jcabi'",
query.headers(),
Matchers.allOf(
Matchers.hasEntry(
Expand Down Expand Up @@ -158,6 +161,7 @@ void sendsTextWithGetParameters(
.assertStatus(HttpURLConnection.HTTP_OK);
final MkQuery query = container.take();
MatcherAssert.assertThat(
"should be ends with '€'",
URLDecoder.decode(
query.uri().toString(),
String.valueOf(StandardCharsets.UTF_8)
Expand Down Expand Up @@ -250,7 +254,7 @@ void sendsMultipartPostRequestMatchByteParam(
final MkContainer container = new MkGrizzlyContainer().next(
new MkAnswer.Simple("")
).start();
final byte[] value = new byte[]{Byte.parseByte("-122")};
final byte[] value = {Byte.parseByte("-122")};
RequestTestTemplate.request(container.home(), type)
.method(Request.POST)
.header(
Expand Down

0 comments on commit 723ad24

Please sign in to comment.