C# xUnit.NET 有什么好的文档/书籍/教程吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9006615/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Are there any good documentations / books / tutorials for xUnit.NET?
提问by DIF
On my search for a Unit-Testing tool for C# i have found xUnit.NET. Untill now, i read most of the articles on http://xunit.codeplex.com/and even tried out the examples given at How do I use xUnit.net?.
在我搜索 C# 的单元测试工具时,我找到了 xUnit.NET。到目前为止,我阅读了http://xunit.codeplex.com/上的大部分文章,甚至尝试了如何使用 xUnit.net?.
But sadly, on the offical page i could just find the basic informations to xUnit.NET. Is there any further information avadible for it?
但遗憾的是,在官方页面上我只能找到 xUnit.NET 的基本信息。是否有任何进一步的信息可用?
采纳答案by DIF
Besides the xUnit-1.9.1.chm-Filementioned by Sean U and the Examples on the official xUnit.NET websiteI found two other resources to help me understand the basics of the work with xUnit.NET:
除了Sean U 提到的xUnit-1.9.1.chm-File和官方 xUnit.NET 网站上的示例之外,我还找到了另外两个资源来帮助我了解 xUnit.NET 工作的基础知识:
- An Introduction to xUnit.net for ASP.NET MVC Developersby Stephen Walter
- Learning to Use xUnit.Net(3 Chapter Tutorial) by Maria Marcano
- 用于 ASP.NET MVC 开发人员的xUnit.net 简介,Stephen Walter
- 学习使用 xUnit.Net(3 章教程)作者:Maria Marcano
Sadly, as pointed out also by Sean U, it seems as there are no books at all about the xUnit.NET-Framework yet. So, for further information it looks like one has go with studying the *.chm-File and reading general books about unit testing. Or switch to another testing-framework, that's what I think I'll do...
可悲的是,正如 Sean U 所指出的,似乎还没有关于 xUnit.NET-Framework 的书籍。因此,要获得更多信息,似乎可以学习 *.chm-File 并阅读有关单元测试的一般书籍。或者切换到另一个测试框架,这就是我想我会做的......
Update
更新
Ognyan Dimitrov added some additional resources in his comments:
Ognyan Dimitrov 在他的评论中添加了一些额外的资源:
- XUnitPatterns.comby Gerard Meszaros (Website)
- xUnit Test Patterns: Refactoring Test Codeby Gerard Meszaros (Book)
- XUnitPatterns.comby Gerard Meszaros(网站)
- xUnit 测试模式:重构测试代码作者 Gerard Meszaros(书籍)
回答by Tom Bushell
If you decide to abandon xUnit and use NUnit instead, a good book to read is "The Art of Unit Testing (with examples in .NET)".
如果您决定放弃 xUnit 并改用 NUnit,那么值得一读的好书是“单元测试的艺术(以 .NET 中的示例)”。
Nice clear explanations of both basic and advanced unit testing concepts, using the NUnit framework.
使用 NUnit 框架对基本和高级单元测试概念进行了清晰的解释。

