O'Reilly logo

The Art of Unit Testing, 2nd Edition by Roy Osherove

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required