TestCategoryBaseAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for the "Category" attribute
public ref class TestCategoryBaseAttribute abstract : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public abstract class TestCategoryBaseAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type TestCategoryBaseAttribute = class
inherit Attribute
Public MustInherit Class TestCategoryBaseAttribute
Inherits 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. |