NUnit 语法帮助器类

发布于 2024-10-06 21:40:01 字数 300 浏览 3 评论 0原文

几天后,我发现了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小红帽 2024-10-13 21:40:01

基于约束的测试模型的文档开始。这是“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.

小帐篷 2024-10-13 21:40:01

这是一个老问题,但是看看 框架 github 存储库 将允许您查看实际的帮助器类。

This is an old question, but looking at the framework github repo will allow you to see the actual helper classes.

╭⌒浅淡时光〆 2024-10-13 21:40:01

阅读以下 PDF 教程;它将向您解释如何使用 NUnit 的每个属性:

NUnit 概述和教程< /a>(贾斯汀·克里特斯,德克萨斯州莱斯大学)


Read the following PDF tutorial; it will explain you how to use each attribute of NUnit:

NUnit overview and tutorial (Justin Crites, Rice University, TX)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文