O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

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

The Unit Testing Framework

The unit testing framework is part of Visual Studio (and not the .NET Framework itself). Unit testing in Visual Studio includes a set of framework classes, the tools, and the execution host. You can find the namespace that contains the unit testing framework classes at Microsoft.VisualStudio.TestTools.UnitTesting. Developers are most interested in the attribute classes and the Assert class in this namespace. This section highlights the core usage scenarios for both the attribute and the assertion classes (among others).

Note

The namespace for unit testing is Microsoft.VisualStudio.TestTools.UnitTesting. However, you set a reference to the assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework.

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