From 904f3329cae6dd1da61130fadcc3baec8aef3ca2 Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Mon, 8 Jan 2024 12:00:30 +0530 Subject: [PATCH 1/2] fix more typos --- .../test/java/io/restassured/itest/java/LoggingITest.java | 2 +- .../src/main/java/io/restassured/config/LogConfig.java | 2 +- .../main/java/io/restassured/filter/FilterContext.java | 2 +- .../specification/AuthenticationSpecification.java | 8 ++++---- .../specification/FilterableRequestSpecification.java | 4 ++-- .../restassured/specification/RequestSpecification.java | 4 ++-- .../restassured/specification/ResponseSpecification.java | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java index c28be58e3..3c7ab3774 100644 --- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java +++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java @@ -1384,7 +1384,7 @@ public void logsMultiPartParamsOnLogAll() throws Exception { then(). statusCode(200); - assertThat(writer.toString(), equalTo(String.format("Request URI:\thttp://localhost:8080/greet?firstName=John#€&lastName=Doe%n"))); + assertThat(writer.toString(), equalTo(String.format("Request URI:\thttp://localhost:8080/greet?firstName=John#?&lastName=Doe%n"))); } // This was previously a bug (https://github.com/rest-assured/rest-assured/issues/684) diff --git a/rest-assured/src/main/java/io/restassured/config/LogConfig.java b/rest-assured/src/main/java/io/restassured/config/LogConfig.java index 3be805f0d..8d45c1441 100644 --- a/rest-assured/src/main/java/io/restassured/config/LogConfig.java +++ b/rest-assured/src/main/java/io/restassured/config/LogConfig.java @@ -145,7 +145,7 @@ public LogDetail logDetailOfRequestAndResponseIfValidationFails() { } /** - * Specify a whether or not to enable pretty printing by default. + * Specify whether or not to enable pretty printing by default. * * @param shouldEnable true if pretty-printing should be enabled, false otherwise. * @return A new LogConfig instance diff --git a/rest-assured/src/main/java/io/restassured/filter/FilterContext.java b/rest-assured/src/main/java/io/restassured/filter/FilterContext.java index 5003512e4..55aa4c202 100644 --- a/rest-assured/src/main/java/io/restassured/filter/FilterContext.java +++ b/rest-assured/src/main/java/io/restassured/filter/FilterContext.java @@ -27,7 +27,7 @@ public interface FilterContext { /** - * Add a value that may be used be subsequent filters. + * Add a value that may be used by subsequent filters. * * @param name The name of the value * @param value The value itself diff --git a/rest-assured/src/main/java/io/restassured/specification/AuthenticationSpecification.java b/rest-assured/src/main/java/io/restassured/specification/AuthenticationSpecification.java index 48b4c9260..70bc13e1a 100644 --- a/rest-assured/src/main/java/io/restassured/specification/AuthenticationSpecification.java +++ b/rest-assured/src/main/java/io/restassured/specification/AuthenticationSpecification.java @@ -99,7 +99,7 @@ public interface AuthenticationSpecification { RequestSpecification certificate(String certURL, String password, CertificateAuthSettings certificateAuthSettings); /** - * OAuth2 sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the the OAuth header + * OAuth2 sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the OAuth header * (so currently it's the same as preemptive oauth2 authentication. The reason why it's located here is to be backward compatible). * This assumes you've already generated an accessToken for the site you're targeting. The access token will be put in a header. * @@ -109,7 +109,7 @@ public interface AuthenticationSpecification { RequestSpecification oauth2(String accessToken); /** - * OAuth2 sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the the OAuth header. + * OAuth2 sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the OAuth header. * This assumes you've already generated an accessToken for the site you're targeting. * * @param accessToken The access token @@ -120,7 +120,7 @@ public interface AuthenticationSpecification { /** * Excerpt from the HttpBuilder docs:
- * OAuth sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the the OAuth header. + * OAuth sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the OAuth header. * All requests to all domains will be signed for this instance. * This assumes you've already generated an accessToken and secretToken for the site you're targeting. * For more information on how to achieve this, see the Scribe documentation.

@@ -135,7 +135,7 @@ public interface AuthenticationSpecification { /** * Excerpt from the HttpBuilder docs:
- * OAuth sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the the OAuth header. + * OAuth sign the request. Note that this currently does not wait for a WWW-Authenticate challenge before sending the OAuth header. * All requests to all domains will be signed for this instance. * This assumes you've already generated an accessToken and secretToken for the site you're targeting. * For more information on how to achieve this, see the Scribe documentation.

diff --git a/rest-assured/src/main/java/io/restassured/specification/FilterableRequestSpecification.java b/rest-assured/src/main/java/io/restassured/specification/FilterableRequestSpecification.java index 9d237d1fb..9d4b21aeb 100644 --- a/rest-assured/src/main/java/io/restassured/specification/FilterableRequestSpecification.java +++ b/rest-assured/src/main/java/io/restassured/specification/FilterableRequestSpecification.java @@ -60,7 +60,7 @@ public interface FilterableRequestSpecification extends QueryableRequestSpecific FilterableRequestSpecification removePathParam(String parameterName); /** - * Remove a named path parameter from the request. It will remove both named and unnamed path parameters. + * Remove a named path parameter from the request. * * @param parameterName The parameter key * @return The {@link FilterableRequestSpecification} without the parameter @@ -124,7 +124,7 @@ public interface FilterableRequestSpecification extends QueryableRequestSpecific FilterableRequestSpecification removeCookie(Cookie cookie); /** - * Replace a header with the new value. If the headerName doesn't exist the will be added. + * Replace a header with the new value. If the headerName doesn't exist it will be added. * * @param headerName The header name to replace * @return The {@link FilterableRequestSpecification} with the replaced header diff --git a/rest-assured/src/main/java/io/restassured/specification/RequestSpecification.java b/rest-assured/src/main/java/io/restassured/specification/RequestSpecification.java index 23dad7ed1..509cfcdc5 100644 --- a/rest-assured/src/main/java/io/restassured/specification/RequestSpecification.java +++ b/rest-assured/src/main/java/io/restassured/specification/RequestSpecification.java @@ -1102,8 +1102,8 @@ public interface RequestSpecification extends RequestSender { *
      *     given().
      *              csrf("/users").
-     *              formParm("firstName", "John")
-     *              formParm("lastName", "Doe")
+     *              formParm("firstName", "John").
+     *              formParm("lastName", "Doe").
      *     when().
      *              post("/users").
      *     then().
diff --git a/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java b/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
index 58e43dec2..6c41566e7 100644
--- a/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
+++ b/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
@@ -542,7 +542,7 @@ default ResponseSpecification root(String rootPath) {
      *          body("w.something2", is(..)).
      * 
*

- * This is the same as calling rootPath("") but less verbose and the it communicates intent better. + * This is the same as calling rootPath("") but less verbose and it communicates intent better. * * @see #rootPath(String) */ @@ -658,7 +658,7 @@ default ResponseSpecification appendRoot(String pathToAppend) { * body("lastName", is(..)). * *

- * you can use a append root and do: + * you can use a detach root and do: *

      * when().
      *          get(..);

From cfed6106f0def339c8aff8071947d89e30521d98 Mon Sep 17 00:00:00 2001
From: Arun Kumar 
Date: Wed, 17 Jan 2024 13:14:34 +0530
Subject: [PATCH 2/2] Revert query param suffix

---
 .../src/test/java/io/restassured/itest/java/LoggingITest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java
index 3c7ab3774..c28be58e3 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java
@@ -1384,7 +1384,7 @@ public void logsMultiPartParamsOnLogAll() throws Exception {
         then().
                 statusCode(200);
 
-        assertThat(writer.toString(), equalTo(String.format("Request URI:\thttp://localhost:8080/greet?firstName=John#?&lastName=Doe%n")));
+        assertThat(writer.toString(), equalTo(String.format("Request URI:\thttp://localhost:8080/greet?firstName=John#€&lastName=Doe%n")));
     }
 
     // This was previously a bug (https://github.com/rest-assured/rest-assured/issues/684)