NUnit 语法帮助器类
几天后,我发现了 NUnit Helper Classes。
我查看了 NUnit 网站、wiki,并进行了 google 网站搜索,但我找不到可靠的文档。到处都有提到,但没有真正的文档。
2.5 版本的发行说明中提到了这一点,但除此之外我找不到任何内容。
http://nunit.org/?p=releaseNotes&r=2.5
有吗有关于此的文档,还是只是线索和错误?
After a few days, I discovered NUnit Helper Classes.
I've looked at the NUnit site, wiki, and did a google site-search, but I can't find solid documentation on it. It's mentioned here and there, but no real documentation.
It's mentioned in the release notes for version 2.5, but I can't find anything besides that.
http://nunit.org/?p=releaseNotes&r=2.5
Is there documentation on this, or is it just trail and error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从基于约束的测试模型的文档开始。这是“is”、“has”、“text”(实际上已被字符串约束废弃)和“list”(在文档中称为“List Mapper”)的位置。
“Throws”只是一个作为方法实现的 异常断言在断言()上。
我明白你的观点,似乎没有一个正式的页面记录“is”上的所有方法。这可能是因为该类中的功能太多,涵盖了许多用例。您会在几乎所有子页面上看到“is”。就我个人而言,一旦理解了约束模型,我就把“is”放入 Visual Studio 对象浏览器中,事情很快就变得清晰起来。
Start with the documentation on the Constraint-Based testing model. This is where "is", "has", "text" (actually obsoleted by string constraints), and "list" (in the documentation as List Mapper) are.
"Throws" is just an Exception Assert that's implemented as a method on Assert().
I see your point there doesn't seem to be a formal page that documents all methods on "is". It might be because there's so much functionality in that class that spans many use cases. You'll see "is" mentioned on almost all of the sub pages. Personally once I understood the constraint model, I threw "is" into the Visual Studio object browser and things became clear fairly quickly.
这是一个老问题,但是看看 框架 github 存储库 将允许您查看实际的帮助器类。
This is an old question, but looking at the framework github repo will allow you to see the actual helper classes.
阅读以下 PDF 教程;它将向您解释如何使用 NUnit 的每个属性:
Read the following PDF tutorial; it will explain you how to use each attribute of NUnit: