Unit testing in Visual Studio

on July 27, 2005

TestDriven.NET is a great tool for UnitTesting in VisualStudio.


It uses NUnit to test from the code. So you can build tests inside your class and test your code from the context menu. Much more to learn if you read the doc. This is just a reminder…


To compile project you need to add a reference to:

C:\Program Files\TestDriven.NET 1.0\NUnit\NUnit.Framework.dll to get NUnit.framework as reference. So you can also add “using using Nunit.framework” to your namespace.

Here is a demo of the code to write for testing:

[TestFixture]

public class test

{

[Test]

public void ExportToFileFromDSasHTML()

{Debug.WriteLine("Test");

}

}

0 comments:

ShareThis