Automated tests Pex是否可以使用类类型的参数处理接口
我已经安装了学术版的pex和角色 我在VisualStudio2010中编写了以下代码。但是pex只提供了一个空指针作为输入。pex不支持类类型吗?请帮帮我 这个测试就是测试 源代码:Automated tests Pex是否可以使用类类型的参数处理接口,automated-tests,pex,Automated Tests,Pex,我已经安装了学术版的pex和角色 我在VisualStudio2010中编写了以下代码。但是pex只提供了一个空指针作为输入。pex不支持类类型吗?请帮帮我 这个测试就是测试 源代码: public class ClassForPex { public int a; public int b; ClassForPex(int x, int y) { a = x; b = y; } }; public static class StringExtensions { publi
public class ClassForPex
{
public int a;
public int b;
ClassForPex(int x, int y)
{
a = x;
b = y;
}
};
public static class StringExtensions
{
public static int Test(ClassForPex cjh)
{
if (cjh.a > cjh.b)
return cjh.a;
else
{
return cjh.b;
}
}
}
您需要使用工厂为测试提供ClassForPex实例。看看这篇文章,看看如何做到这一点 在Pex中使用工厂-