Table of Contents

Class TraitAttribute

Namespace
Xunit
Assembly
xunit.v3.core.dll

Attribute used to decorate a test method, test class, or assembly with an arbitrary name/value pair ("trait").

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true)]
public sealed class TraitAttribute : Attribute, ITraitAttribute
Inheritance
TraitAttribute
Implements
Inherited Members

Constructors

TraitAttribute(string, string)

Attribute used to decorate a test method, test class, or assembly with an arbitrary name/value pair ("trait").

Properties

Name

Get the trait name.

Value

Gets the trait value.

Methods

GetTraits()

Gets the trait values from the trait attribute.