TestCategoryBaseAttribute Třída
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Základní třída pro atribut Category.
public ref class TestCategoryBaseAttribute abstract : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
public abstract class TestCategoryBaseAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class TestCategoryBaseAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public abstract class TestCategoryBaseAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)>]
type TestCategoryBaseAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type TestCategoryBaseAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type TestCategoryBaseAttribute = class
inherit Attribute
Public MustInherit Class TestCategoryBaseAttribute
Inherits Attribute
- Dědičnost
-
TestCategoryBaseAttribute
- Odvozené
- Atributy
Poznámky
Důvodem tohoto atributu je umožnit uživatelům vytvořit vlastní implementaci testovacích kategorií. – testovací architektura (zjišťování atd.) se zabývá testCategoryBaseAttribute. – Důvodem, proč je vlastnost TestCategories kolekcí místo řetězce, je poskytnout uživateli větší flexibilitu. Implementace může být například založena na výčtech, pro které mohou být hodnoty OR'ed, v takovém případě dává smysl mít jeden atribut, nikoli více atributů ve stejném testu.
Konstruktory
| Name | Description |
|---|---|
| TestCategoryBaseAttribute() |
Inicializuje novou instanci TestCategoryBaseAttribute třídy. Použije kategorii pro test. Řetězce vrácené testCategories se používají s příkazem /category k filtrování testů. |
Vlastnosti
| Name | Description |
|---|---|
| TestCategories |
Získá testovací kategorii, která byla použita pro test. |