What did I do wrong here when trying to unit test a class that references a web service

Posted by zachary on Stack Overflow See other posts from Stack Overflow or by zachary
Published on 2010-06-08T15:13:00Z Indexed on 2010/06/08 15:22 UTC
Read the original article Hit count: 186

Filed under:
|
|

So I had a class that referenced a class that referenced another class that called a web service.

So I learn how to create an interface using partial classes.

I inject the web service through the constructor.

Then my unit test fails because I am newing up the actual web service in the second level of the class. So I end up modifying all three classes to pass the web service down through the constructor... was not happy :-( gave up....

what should I be doing in this case?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about web-services