These would probably just be added to the Expectations interface.
Could add a helper set of methods that work with RequestWithContent so that you can avoid casting when using the API (use method name requestWithContent).
The main benefit here is that you could easily write tests for the same matchers and responses across multiple HTTP methods using parameterized tests with the HTTP method as one of the parameters.
As an alternative to the method-specific expectation definition methods, add a set of generic ones along the lines of:
These would probably just be added to the
Expectations
interface.Could add a helper set of methods that work with
RequestWithContent
so that you can avoid casting when using the API (use method namerequestWithContent
).This would allow an expectation like:
The main benefit here is that you could easily write tests for the same matchers and responses across multiple HTTP methods using parameterized tests with the HTTP method as one of the parameters.