-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
code changes for adding support for form parameter matching #2157
code changes for adding support for form parameter matching #2157
Conversation
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.
Thanks for the pull request! The binary compatibility issue in the interface needs to be fixed before this pull request can be merged.
src/test/java/com/github/tomakehurst/wiremock/matching/RequestPatternTest.java
Show resolved
Hide resolved
FWIW, there is #2153 for providing clear separation between really public APIs and not so ones |
incorporated review comment changes |
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.
LGTM
@@ -60,6 +60,14 @@ interface Part { | |||
|
|||
QueryParameter queryParameter(String key); | |||
|
|||
default FormParameter formParameter(String key) { |
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.
Can we ditch these defaults and ensure we've implemented these everywhere instead?
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.
Done. We have implemented these everywhere. Oleg suggested adding this as it might break the implementation for those who might be using this interface as this is part of the library and exposed.
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.
I feel that it is very unlikely that anyone using it as we are using this interface as the base for our receiving requests, matching etc it wherever required. Consumers of Wiremock may not be using it for any of these purposes. But it is always better to add a safety net.
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.
Something weird has happened to the formatting here so I can't really see what's actually changed. Please can you restore the formatting and add just your change.
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.
I just added my change but spotless check started failing. It was very minor test so I just removed it for now. Let me know if you have any work around to fix this.
Apart from the couple of minor comments above, looks good. Happy to merge this once these are resolved and Oleg's comment on the doc PR is also resolved. |
1 similar comment
Apart from the couple of minor comments above, looks good. Happy to merge this once these are resolved and Oleg's comment on the doc PR is also resolved. |
Looks like you've deleted your changes to We need some serialisation/deserialisation tests, which I think belong in there. |
as discussed, first applied formatting changes followed by added new UTs. |
actualJson, | ||
true); | ||
} | ||
|
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.
Please can we also have a test case showing that serialisation works correctly?
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.
sure, incorporated
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.
I believe you mean deserialization. I have now tests for both - serialization and deserialization.
Great stuff, thanks! |
Resolves #383
Code changes for adding support for form parameter matching.
Added tests for mentioned scenarios: