c# - 方法属性 TestMethod 和 TestMethod() 之间有什么区别?

标签 c# visual-studio-2010 unit-testing

我正在使用 Visual Studio 单元测试 fwk 为 C# 项目编写单元测试,发现使用 [TestMethod][TestMethod()] - 任何属性工作正常。它们有什么区别?

最佳答案

属性可以有参数。如果你不传递任何参数,你可以写 [测试方法] 或 [测试方法()]。

关于c# - 方法属性 TestMethod 和 TestMethod() 之间有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28110319/

相关文章:

unit-testing - Rhino 模拟,MbUnit : Best way to check if object has raised an event

python - 指定根目录时 gcovr 无限循环

时间:2019-03-17 标签:c#filecontainer

c# - 如何下载没有url的pdf

c# - 接口(interface)和部分类

c++ - 未解析的外部 C++,默认构造函数

java - 组合与继承——这如何帮助单元测试?

c# - 获取 Windows Store App 中的所有媒体文件

visual-studio-2010 - cuda 错误 MSB3721 退出,代码为 2

visual-studio-2010 - Web 部署打包失败 : Illegal characters in path