Unit Testing Functions that Access Web-Services
Sorry about the title but I couldn't come up with anything shorter to describe the topic.
Background
The system we built for our client makes use of an external 3rd party web-service for certain data. Naturally there are a number of things that can happen which we need to handle gracefully.
- Web service not reachable
- XML returned not well formed
- Data doesn't conform to business rules (e.g. old data, incorrect datatypes etc)

