Converting from MsTest to NUnit

Migrating a project to NUnit would require some of the following (and more)….

  1. Add reference to nunit.framework.dll
  2. Replace “using Microsoft.VisualStudio.TestTools.UnitTesting;” with “using NUnit.Framework;”
  3. Search-Replace the following:
    • [TestClass] -> [TestFixture]
    • [TestMethod] -> [Test]
    • [TestInitialize] -> [SetUp]
    • [TestCleanup] -> [TearDown]
    • [TestClassInitialize] -> [TestFixtureSetUp]
    • [TestClassCleanup] -> [TestFixtureTearDown]

 

Leave a comment