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.
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET