[CodedUITest]
public partial class UIMap
{
[TestMethod]
public static bool? TestMethod1()
{
//code
}
}
此方法“TestMethod1”未显示在Test Explorer上。为什么呢?
答案 0 :(得分:2)
假设您使用的是Microsoft的单元测试框架:
测试方法要求
测试方法必须符合以下要求:
- 该方法必须使用[TestMethod]属性进行修饰。
- 该方法必须返回void。
- 该方法不能有参数。