How do I write unit tests in .NET?
Specifically Visual Studio 2005?
If you're using one of the Visual Studio Team Suite products, you reference Microsoft.VisualStudio.TestTools.UnitTesting, decorate your test classes with the TestClass attribute, and decorate your test methods with the TestMethod attribute.
The approach for NUnit is similar, except that you reference NUnit.Framework, the class will be decorated with TestFixture, and the test methods will be decorated with Test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With