TestCategoryBaseAttribute Class

Definition

Base class for the "Category" attribute.

C++
public ref class TestCategoryBaseAttribute abstract : Attribute
Inheritance
TestCategoryBaseAttribute
Derived
Attributes

Remarks

The reason for this attribute is to let the users create their own implementation of test categories. - test framework (discovery, etc) deals with TestCategoryBaseAttribute. - The reason that TestCategories property is a collection rather than a string, is to give more flexibility to the user. For instance the implementation may be based on enums for which the values can be OR'ed in which case it makes sense to have single attribute rather than multiple ones on the same test.

Constructors

TestCategoryBaseAttribute()

Initializes a new instance of the TestCategoryBaseAttribute class. Applies the category to the test. The strings returned by TestCategories are used with the /category command to filter tests.

Properties

TestCategories

Gets the test category that has been applied to the test.

Applies to

Produkt Versionen
MSTest.TestFramework 1.1.18, 1.2.1, 1.3.2, 1.4.0, 2.2.0, 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0