Class FeatureAttribute
- Namespace
- TinyBDD
- Assembly
- TinyBDD.dll
Marks a test class as a BDD Feature, providing a human-friendly name and an optional description.
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class FeatureAttribute : Attribute
- Inheritance
-
FeatureAttribute
- Inherited Members
Examples
[Feature("Shopping Cart", "Customers can add and remove items")]
public class CartTests : TinyBddXunitBase { /* ... */ }
Remarks
The attribute is read by CreateContext(object, string?, ITraitBridge?, ScenarioOptions?) to populate FeatureName and FeatureDescription.
Constructors
FeatureAttribute(string, string?)
Creates a new FeatureAttribute.
public FeatureAttribute(string name, string? description = null)
Parameters
namestringThe feature name to display in reports.
descriptionstringOptional human-readable description shown under the feature.
Properties
Description
Optional feature description shown beneath the feature name.
public string? Description { get; }
Property Value
Name
The user-facing feature name displayed in reports.
public string Name { get; }