Configuring Unit Test Attributes

As you have seen, there are many attributes you can apply to a unit test. Configuring each of these attributes in the code editor is certainly a viable option. However, Visual Studio provides some assistance inside the Properties dialog box. You can select a given unit test, view the Properties window and then configure which attributes you want to apply to the test method. Visual Studio then generates the attribute code for your test method. Let’s look at an example.

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.