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.
- Make sure you have installed the Unit Test Generator plugin for Visual Studio.
- 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).
- Test the Student class using xUnit. The plugin can assist you in generating the test.
- Test the Student class using NUnit. The plugin can assist you in generating the test.
- Does xUnit and NUnit work well with "Analyze Code Coverage"?
- Any support for a "test first" approach?
- Which unit test framework do you find is the best?