"Vlad" <Vl**@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
I am implementing class that uses Web service written by another and it is
not implemented yet. How can I test my class using NUnit framework without
make changes in future when web service will be implemented?
One way to test the Web Service consumer application is to use the mock
object pattern with the Web Service proxy.
All you need is the WSDL of the Web Service. Use the WSDL to generate a Web
Service proxy for the client object, and then modify the proxy to return
hard-coded responses to the client application.
As a side-note, this would be easier if the proxy generator generated
virtual methods so one could subclass the proxy and override the methods. As
it stands now, you will have to modify the generated proxy code and the
downside is that you'll lose the modifications every time the proxy is
regenerated.
Regards,
Sami