Testing WCF services with external dependencies

This sample shows how a WCF instance provider can be used to create "unit" tests for a WCF service which has external dependencies.

C# (46.4 KB)
 
 
 
 
 
4.5 Star
(2)
2,102 times
Add to favorites
5/31/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Accessing the ServiceHost from HostingProcess
    1 Posts | Last post October 12, 2015
    • I am sing a DuplexService and need my Windows Service to be able to push data to clients through the ServiceHost (clients are subscribed to this and callbacks are in dictionary) - I am trying to create a Channel using the DuplexChannelFactory<T> but am facing some really difficult problems, the instance context does not exist, and then when I pass my ServiceContract in the constructor of WCFHost<T> I get that I do not implement callback interface - what do I need to place in the code to be able to do this task. I came across your instance provider class but I am at a loss - beyond my expertise at the moment. Any ideas on how to accomplish what I am trying to do ?