-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Support multiple matchers in MockMvc Kotlin DSL #24103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I can understand how it could be confusing, but here we are reusing the
One way of supporting your use case would be to create a Any thoughts @checketts @jnizet? |
I absolutely want a I'll be converting my tests over from the kd4smt to this new DSL and I suspect I'll run into these sorts of issues. |
@checketts Do you want to provide a PR? |
@sdeleuze I haven't been using the DSL in a while, and I've never been hit by this issue myself but I agree that the current situation is confusing, and that a ModelResultMatchersDsl would be nice. |
@devtribe Thanks for raising this important issue, I think it is now properly fixed. |
@sdeleuze while this seems like an important fix, I really miss the property access syntax of isOk, etc. |
Affects: 5.2.1.RELEASE
I would expect that in a DSL everything in a lambda block will be executed.
But if i try to assert multiple matchers in the
model
block only the last one will be executed.I didn't get any feedback about this behaviour, so i get the false impression that my code is executed, if it isn't.
Doesn't work like expected:
Works, but is redundant code:
The text was updated successfully, but these errors were encountered: