WCF unit testing problems encountered

 
This is at
This test method is to right click adding unit unit testing, the system automatically generates a before method. Direct the implementation of the method is the following error occurs:
 
I find a lot of the results are found to HostType () and [UrlToTest] two lines gaze away from the Internet. Why is not known.
When performing the test there was a mistake not to load data from web.config WCF service, because the test is read by its own class library configuration file, so you have to test files in the library adding a configuration file, the contents of the file to be consistent with the content WCF service web.config.

Reproduced in: https: //www.cnblogs.com/baishiying/archive/2013/05/16/3081267.html

Guess you like

Origin blog.csdn.net/weixin_34191845/article/details/93439948