By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,600 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,600 IT Pros & Developers. It's quick & easy.

Mocking a web service for TDD

P: n/a
Hi,
I am trying to adopt TDD.

I have a client Application that retrieves some data from a web service. To
help with testing I want to use dependency injection and mock the web
service.

This obviously requires me to use the same interface on the real and mock
objects.

At the moment I have put a simple wrapper around the web service locally
and mocked the wrapper.

I would prefer not to do this as it adds an extra layer of complexity that
is only required for testing.

I feel I must be missing something obvious as it would be much neater if I
could mock the web service itself (i.e. share the interface locally).

Any ideas on how to do this?

Thanks
Sep 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.