Class TagAttribute
- Namespace
- TinyBDD
- Assembly
- TinyBDD.dll
Declares a tag on a feature class or scenario method. Tags are recorded in Tags and forwarded to the active ITraitBridge so test frameworks can expose them as categories/traits.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true)]
public sealed class TagAttribute : Attribute
- Inheritance
-
TagAttribute
- Inherited Members
Examples
[Feature("Orders")]
[Tag("integration"), Tag("slow")]
public class OrderTests { /* ... */ }
public class ShippingTests
{
[Scenario("Ships overnight"), Tag("shipping"), Tag("fast")]
public async Task ShipsOvernight() { /* ... */ }
}
Constructors
TagAttribute(string)
Declares a tag on a feature class or scenario method. Tags are recorded in Tags and forwarded to the active ITraitBridge so test frameworks can expose them as categories/traits.
public TagAttribute(string name)
Parameters
namestring
Examples
[Feature("Orders")]
[Tag("integration"), Tag("slow")]
public class OrderTests { /* ... */ }
public class ShippingTests
{
[Scenario("Ships overnight"), Tag("shipping"), Tag("fast")]
public async Task ShipsOvernight() { /* ... */ }
}
- See Also
Properties
Name
The tag value.
public string Name { get; }