MSTEST0041: Use 'ConditionBaseAttribute' on test classes
Property | Value |
---|---|
Rule ID | MSTEST0041 |
Title | Use 'ConditionBaseAttribute' on test classes |
Category | Usage |
Fix is breaking or non-breaking | Non-breaking |
Enabled by default | Yes |
Default severity | Warning |
Introduced in version | 3.8.0 |
Is there a code fix | No |
Cause
The use of an attribute that inherits from ConditionBaseAttribute on a class that is not marked with TestClassAttribute.
Rule description
An attribute that derives from ConditionBaseAttribute only has an effect when applied to a class that's marked with TestClassAttribute.
How to fix violations
Depending on the intent, either add the missing TestClassAttribute or remove the attribute that derives from ConditionBaseAttribute.
When to suppress warnings
Do not suppress a warning from this rule.
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.