Exercise: Other unit testing frameworks

Until now we have used the unit testing framework MSTest defined in the namespace Microsoft.VisualStudio.TestTools.UnitTesting.

However, other unit testing frameworks do exist, for example xUnit and NUnit.

  1. Make sure you have installed the Unit Test Generator plugin for Visual Studio.
  2. Make another project in Visual Studio with a simple Student class. Make sure some of the methods in the Student class throws exception (we need something interesting to test).
  3. Test the Student class using xUnit. The plugin can assist you in generating the test.
  4. Test the Student class using NUnit. The plugin can assist you in generating the test.
  5. Does xUnit and NUnit work well with "Analyze Code Coverage"?
  6. Any support for a "test first" approach?
  7. Which unit test framework do you find is the best?