Creating a Test Class

To create a test class, add a new class to your test project. Then add the following two using statements to the top of the class:

using Microsoft.Phone.Testing;using Microsoft.VisualStudio.TestTools.UnitTesting;

Test-related attributes and assertion types can be found within the namespace Microsoft.VisualStudio.TestTools.UnitTesting. Even if you have not used the Visual Studio UTF before, it is easy to pick up because the attribute names are fairly self-descriptive.

Tests consist of test classes and test methods. The UTF relies on metadata, provided by attributes, for identifying unit test classes and methods at runtime. To indicate that a class is a unit test class, decorate it with the ...

Get Windows® Phone 8 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.