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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access