A.3. Test APIs

The next batch of tools provides higher-level abstractions and wrappers for the base unit testing frameworks.

A.3.1. MSTest API—Microsoft’s unit testing framework

This comes bundled with any version of Visual Studio .NET Professional or above. It includes basic features that are similar to NUnit.

But several problems make MSTest an inferior product for unit testing compared to NUnit or xUnit.net:

  • Extensibility
  • Lack of Assert.Throws
Extensibility

One big problem with this framework is that it’s not as easily extensible as the other testing frameworks. Although there have been several online discussions in the past about making MSTest more extensible with custom test attributes, it seems that the Visual Studio team has all but ...

Get The Art of Unit Testing, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.