C# 无法使用IntelliTest测试WCF终结点
我正在尝试使用C# 无法使用IntelliTest测试WCF终结点,c#,wcf,intellitest,C#,Wcf,Intellitest,我正在尝试使用IntelliTest测试我的WCF服务端点。我已经在测试项目中创建了IntelliTest单元,但是我需要指定服务器地址和端口,以便测试能够远程工作 这是pex方法之一 public ICredentials CredentialsTest() { ICredentials result = Service.Credentials(); return result; // TODO: add assertions to method ServiceTest
IntelliTest
测试我的WCF服务端点。我已经在测试项目中创建了IntelliTest
单元,但是我需要指定服务器地址和端口,以便测试能够远程工作
这是pex方法之一
public ICredentials CredentialsTest()
{
ICredentials result = Service.Credentials();
return result;
// TODO: add assertions to method ServiceTest.CredentialsTest()
}
我补充说
Service.ServiceEndPointAddress = "net.tcp://localhost:51010/WCFService";
但是当我运行测试时,我得到一个invalidProgrameException
我想做的是分配ServiceEndPointAddress一次,因为它是服务中的静态属性。有谁能提供一些指导吗?这里有几个问题: