Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TestCategoryBaseAttribute Class

 

Provides a base class for the Category attribute.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryBaseAttribute
      Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute

[AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = true)]
public abstract class TestCategoryBaseAttribute : Attribute

NameDescription
System_CAPS_protmethodTestCategoryBaseAttribute()

Initializes a new instance of the TestCategoryBaseAttribute class.

NameDescription
System_CAPS_pubpropertyTestCategories

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

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

The purpose for this attribute is to let users create their own implementation of test categories. The TestCategories property is a collection instead of a string so that it gives more flexibility to the user. For example, the implementation may be based on enumerations. These values can be combined by using the bitwise OR operation, in which case it makes sense to have a single attribute instead of multiple ones on the same test.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: