Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo in Javadoc of ValidatableResponseOptions.java #1164

Merged
merged 1 commit into from May 3, 2019

Conversation

LorenzoBettini
Copy link
Contributor

The Javadoc of T header(String headerName, ResponseAwareMatcher expectedValueMatcher) shows an example that does not compile:

assertThat().header("Location", response -> response.endsWith("/x/") + response.path("id"));

in fact, endsWith is not a method of response, it's an Hamcrest matcher. This small patch fixes the example in the Javadoc. I propose the fix according to one of the tests of REST Assured itself, https://github.com/rest-assured/rest-assured/blob/master/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/HeaderITest.java#L220

The Javadoc of T header(String headerName, ResponseAwareMatcher<R> expectedValueMatcher) shows an example that does not compile:

```
assertThat().header("Location", response -> response.endsWith("/x/") + response.path("id"));
```

in fact, `endsWith` is not a method of response, it's an Hamcrest matcher. This small patch fixes the example in the Javadoc. I propose the fix according to one of the tests of REST Assured itself, https://github.com/rest-assured/rest-assured/blob/master/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/HeaderITest.java#L220
@johanhaleby johanhaleby merged commit 34cc24a into rest-assured:master May 3, 2019
@johanhaleby
Copy link
Collaborator

Thank you!

@LorenzoBettini LorenzoBettini deleted the patch-1 branch May 3, 2019 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants