这是我用来通过接口IService1.Which实现通道工厂调用我的wcf服务方法(GetCountry)的方法
public IList<Country> GetCountry()
{
ChannelFactory<ServiceLibrary.IService1> channelFactory = new ChannelFactory<IService1>(binding, address);
IService1 channel1 = channelFactory.CreateChannel();
var response= channel1.GetCountry();
return response;
}
如何使用NUNIT模拟服务调用?
答案 0 :(得分:1)