I am coming from Java and am currently working on a C# project. What is the recommended way to go about a) unit testing existing C# code and b) accomplishing TDD for C# development?
Also is there an equivalent to EMMA / EclEmma (free yet powerful code coverage tool) for Visual Studio and C# code?
NUnit是在JUnit之后进行模式化的,但是如果您使用的是Visual Studio 2008,请考虑使用内置的单元测试框架。
我强烈建议Gallio (以前是mbUnit)进行单元测试,(不幸的是不是免费的)建议使用NCover进行代码覆盖。
Regarding your question about unit test frameworks:
NUnit 1.0 was a direct port of JUnit. NUnit 2.0 moved away from JUnit syntax in order to take advantage of the .NET platform. xUnit.net is a newer unit test framework (from Jim Newkirk - one of the NUnit 2.0 developers - and Brad Wilson) that states as a goal exposing "advances in other unit test library implementations that have not really surfaced in .NET," which I read as "keeping up with JUnit."
NUnit就是这样。
NUnit, but NCover is only part of the answer as it isn't free. I've asked elsewhere about that.
VS2008 Professional具有团队系统单元测试功能。
NUnit的肯定。
I'd install:
As and aside I find it odd that the NUnit guys seem to be using php to host their homepage...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.