开发者

Unit testing examples for VS2010 testing tools

I'm looking for sample solution(s) that demonstrate various kinds of unit tests in C# using best practices. Also I require the examples to use the Visual Studio test tools. I know that there are a number of books and web sources on unit testing, but they don’t use the Visual Studio tools for writing their unit tests. I don’t want really basic examples such as can be found here. I am looking to move to the n开发者_Go百科ext level of unit-testing and I can’t find advanced examples of unit testing that use Visual Studio 2010 or even VS 2008.

EDIT: To be more clear; I am working on a project where I have to use the testing tools that are built in to Visual Studio. I am not looking for info on any 3rd party testing tools.


Visual Studio unit testing intro and TDD: Test-Driven Development with Visual Studio 2008 Unit Tests may be more to what you are wanting to find perhaps.

nUnit's adoption before Microsoft put built-in unit test support is my guess for why the built-in testing abilities are shunned to some extent. nAnt/nUnit and CI tools may be used outside of the Team System that has a substantial cost in some cases I'd think. Though for those open to 3rd party ideas, here are a couple of other examples:

Using NUnit in Visual Studio 2010 may be a blog example that shows you nUnit + VS2010 as it is possible to do that.

Easy Debugging of NUnit Tests from Visual Studio 2008 Professional would be an example for 2008.

By advanced do you mean things like Rhino Mocks?


Have you considered nUnit?, there are plenty of advanced testing examples if you take a poke around google.

Edit:

Just stumbled across another Unit Testing suite, MbUnit which seems to be aimed at more advanced testing.


The closest thing that I have found so far is the Enterprise Library; although it is not written as a unit test tutorial it does have a large number of unit tests and code written using best practices. If no one else comes up with something better, I will mark this as the answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜