Testing Code with Unit Tests

Unit tests enable you to test code portions outside the application context to check whether they work correctly so that testing is abstracted from the application. Typically, you create a test project in which classes and methods encapsulate and isolate the original code so that you can test it in a kind of isolated sandbox without editing the source project. Visual Studio 2015 is the ideal environment for performing unit tests, so this section explains how you can accomplish this important task. In this section, you learn how to create unit tests for existing code. This is necessary to give you the basics for learning Test Driven Development in the next section of this chapter, where you instead learn how to start ...

Get Visual Basic 2015 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.