问题描述
我几十年来一直在使用Visual Studio Professional。现在评估企业的单元测试功能。使用MsTest V2。我注意到,在前几次尝试中,正在创建完整的测试,如下所示:
I have been using Visual Studio Professional for decades. Now evaluating Enterprise for its Unit test features. Using MsTest V2. I noticed that in the first few tries, complete tests were being created, as:
[TestMethod]
[PexGeneratedBy(typeof) (CommonCodeTest))]
public void AgeValTest468()
{
int i;
i = this.AgeValTest
(new DateTime(4611686018427387903L& 1L,(DateTimeKind)(1uL>> 62)),
new DateTime?(默认(DateTime)),false);
PexAssert.AreEqual< int>(0,i);
}
[TestMethod]
[PexGeneratedBy(typeof(CommonCodeTest))]
public void AgeValTest468()
{
int i;
i = this.AgeValTest
(new DateTime(4611686018427387903L & 1L, (DateTimeKind)(1uL >> 62)),
new DateTime?(default(DateTime)), false);
PexAssert.AreEqual<int>(0, i);
}
但是当我尝试在ViewModel上使用IntelliTest创建测试时,测试只是部分完成as:
But when I tried creating tests using IntelliTest on a ViewModel, the tests are only partially done as:
///< summary>测试存根.ctor()< / summary>
[PexMethod]
public PHViewModel ConstructorTest()
{
PHViewModel target = new PHViewModel();
返回目标;
// TODO:向方法添加断言PHViewModelTest.ConstructorTest()
}
/// <summary>Test stub for .ctor()</summary>
[PexMethod]
public PHViewModel ConstructorTest()
{
PHViewModel target = new PHViewModel();
return target;
// TODO: add assertions to method PHViewModelTest.ConstructorTest()
}
所以我的问题是:我可以看到VS确实具有创建"完整"功能的能力。测试,是部分完成测试,因为我正在使用试用版,或者我可能没有正确完成,或者我看到即使在支付全价后我将获得
。
So my question is: As I can see that the VS does have the capability of creating "complete" tests, are the partially done tests because I am working with the trial version, or perhaps I am not doing it correctly, or I am seeing what I will get even after paying the full price.
如果我做错了,我会欣赏一两个提示,这样我才能做得对。 谢谢
If I am doing it wrong, I will appreciate a hint or two so I can do it right. Thanks
推荐答案
问候,
Fletcher
这篇关于考虑从专业版升级到企业版:关于MsTest v2的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!