Unit Testing Basics

Unit testing in Visual Studio is about creating tests methods that run the code inside the working layers of your application and validate the expected results—even thrown exceptions. This includes testing the many classes that make up your business and data domain. The user interface domain is typically just markup (depending on your architecture approach), and the markup is tested manually (or through tools such as CodedUI which is in Visual Studio Enterprise). The focus of unit tests is writing code to test the functional code you write. In this section, we cover the basics of writing unit tests. We drill in on these basics in coming sections.

Note

Visual Studio Enterprise includes additional testing tools targeted at ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.