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