-
Notifications
You must be signed in to change notification settings - Fork 138
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
fix(#341): Allow comma and brackets in matcher expressions #977
Conversation
1822612
to
d22b822
Compare
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 like it! the provided test case does perfectly display its functionality.
formatting could be a little more consistent, tho. but who am I to judge 😉
Thanks for the flowers Mr. Eagle Eye Borter! I still want to come up with a solution, that also allows the ' in the param string. |
2836841
to
300295f
Compare
I guess thats it. |
0734349
to
bd3d874
Compare
Added some more tests. I think this is now ready for final review. |
bd3d874
to
2b8fccc
Compare
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.
just saw some formatting issues. all good otherwise.
...src/main/java/org/citrusframework/validation/matcher/hamcrest/HamcrestValidationMatcher.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/citrusframework/validation/matcher/hamcrest/HamcrestValidationMatcher.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/citrusframework/validation/matcher/hamcrest/HamcrestValidationMatcher.java
Outdated
Show resolved
Hide resolved
2b8fccc
to
dcdab5e
Compare
I am pleased to provide the following fix for Issue 341.
As stated in the issue the problem here are the comma and bracket chars in the matcher expression. They cannot be parsed into the correct matcher parameters using the simple approach, splitting by ','.
Note that for the specific case, the matcher text needs to be put in '', as it contains '(' and ''' characters which would otherwise interfere with the parameter extraction algorithm.
That said, the following expression:
Would perfectly match this string: