Unit Testing Basics

Unit testing in Visual Studio is about creating tests that test the code inside the working layers of your application. This includes the many classes that make up your business and data domain. The user interface, on the other hand, is typically tested using alternate methods of automated testing. These methods are targeted more at testers. These features and products are included in the Premium edition of Visual Studio and thus not covered here. Our focus is the code you write to test the code you write. Of course this assumes you follow good, layered architecture techniques when writing your applications. In this section we cover the basics of writing unit tests. We drill in on these basics in coming sections.

Get Microsoft® Visual Studio® 2010 Unleashed 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.