August 2010
Intermediate to advanced
1224 pages
34h 17m
English
You can start to see how you can leverage the unit tests that are generated for you. Let’s take a look at writing an actual unit test to help better understand them. Recall that a unit test is simply test code you write to call your application code. This test code asserts that various conditions are either true or false as a result of the call to your application code. The test either passes or fails based on the results of these assertions. If, for example, you expect an outcome to be true and it turns out false, then a test fails.
After you have a test project and a test class, there are three steps to creating a typical unit test:
1. Apply the TestMethod attribute to the test code.
2. Execute the code in question ...