-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make JsonSchemaAssertions check for JSON content-type #65
Make JsonSchemaAssertions check for JSON content-type #65
Conversation
Yes. I can forsee that an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice pull request 👍. Do you want to make the CommonAssertions
abstraction yourself in this pull request or not?
@@ -55,6 +60,12 @@ public void execute(int statusCode, | |||
} | |||
} | |||
|
|||
public JsonSchemaAssertions overrideContentType(ContentType contentType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add JavaDocs to this public
method, please? I think you can add the same JavaDocs as JsonResponseAsserions
.
* @param contentType | ||
* @return A model response object. | ||
*/ | ||
static ModelResponse<String> prepare(String jsonContent, String contentType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method appears to be a generalisation of the method above it. I would rewrite (and rename) the method above this one to use the new method you wrote.
Added javadoc and refactored helper method to use a more general method.
I think it's best if we refactor the structure of the assertions in a separate pull request. I can open an issue. |
I've applied the other changes requested. |
Opened #66 for the assertion abstraction task. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! Merging!
Added assertions on the response content type in
JsonSchemaAssertions
.This fixes #59