Mocking a web service that relies on another service layer
Tried to search for a solution, but maybe I couldn't form my question
right for a useful result.
I would like to know if there are techniques to mock a (web) service that
relies on a black box for its own logic that I have no knowledge of or
control over.
Take payment gateways as an example. How do I mock a payment for testing
where I want to simulate a payment that fails on the bank's level which is
above the gateway's level (the service I'm calling)? For example the card
is declined or some other card related failure.
No comments:
Post a Comment