TestProperty only allows one instance of each key

Snag! So it turns out that TestPropertyAttribute only supports one instance of each key, so it would mean that I would be limited to only associating a single category with each test. Oh well, I guess I’ll write my own attribute then 🙂 I was surprised at how easy this was the first time I did it a few years back.

/// An attribute that is used to associate a category with a
/// test
public class TestCategoryAttribute : Attribute
/// The Category the test is associated with
public string Category
/// Associates the test with a category. These categories are
/// then passed by the TestListGenerator in order to produce
/// Category Dependent Test Lists
///<param name="_category">The category to associate this test to</param>
public TestCategoryAttribute(string _category)
this.Category = _category;

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: