通过


TestCategoryAttribute 类

定义

TestCategory 属性;用于指定单元测试的类别。

public ref class TestCategoryAttribute sealed : Microsoft::VisualStudio::TestTools::UnitTesting::TestCategoryBaseAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class TestCategoryAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryBaseAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class TestCategoryAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryBaseAttribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class TestCategoryAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)>]
type TestCategoryAttribute = class
    inherit TestCategoryBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type TestCategoryAttribute = class
    inherit TestCategoryBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type TestCategoryAttribute = class
    inherit TestCategoryBaseAttribute
Public NotInheritable Class TestCategoryAttribute
Inherits TestCategoryBaseAttribute
继承
TestCategoryAttribute
属性

构造函数

名称 说明
TestCategoryAttribute(String)

初始化类的新实例 TestCategoryAttribute ,并将该类别应用于测试。

属性

名称 说明
TestCategories

获取已应用于测试的测试类别。

适用于