Skip to content

Commit

Permalink
Update RequestMethodTests test to handle CONNECT
Browse files Browse the repository at this point in the history
The CONNECT http method is primarily used for establishing tunnels
and is not relevant for RequestMethod.
  • Loading branch information
v-perfilev committed Jan 4, 2025
1 parent be8483d commit 18106b3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ void resolveString() {
@Test
void resolveHttpMethod() {
for (HttpMethod httpMethod : HttpMethod.values()) {
if (HttpMethod.CONNECT.equals(httpMethod)) {
assertThat(RequestMethod.resolve(httpMethod)).isNull();
continue;
}
RequestMethod requestMethod = RequestMethod.resolve(httpMethod);
assertThat(requestMethod).isNotNull();
assertThat(requestMethod.name()).isEqualTo(httpMethod.name());
Expand Down

0 comments on commit 18106b3

Please sign in to comment.