Open victorherraiz opened 9 months ago
We aren't very actively improving MockWebServer. If you find features that you need in Wiremock, it's probably better to go with that rather than going through the ringer of a big feature change to MockWebServer.
cc @swankjesse thoughts?
That is a pity, MockWebServer, in my opinion, is by far more convenient and it does not have tons of dependencies.
I think this RouteDispatcher
thing is great! But I’d prefer to omit it from the MockWebServer library. If you’d like to do a new library, please do!
OK. At the moment I am going to keep this at a shared library for test in my company, if you reconsider adding a route dispacher, let me know. I could do a pull request with tested RouteDispacher.
I would like to have an alternative to sequential mocking and verifications. Some applications could perform calls concurrently or in a non predictable order. Or it just seems that we are testing "implementation details" when we "force" the order in the interaction. There are several solutions to this issue, like having multiple MockWebServer instances but they feel rather comvoluted.
I implemented a draft of a Route dispacher:
And some example of the usage:
I like this kind of feature in
Wiremock
but I preffer your implementation with less dependencies and included the Spring Boot BOM.If you feel this useful, I could code that in kotlin, add the proper test and do a pull request after your evaluation.