ConditionBaseAttribute Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This attribute is used to conditionally control whether a test class or a test method will run or be ignored, based on a condition and using an optional message.
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)]
public abstract class ConditionBaseAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, Inherited=false)>]
type ConditionBaseAttribute = class
inherit Attribute
Public MustInherit Class ConditionBaseAttribute
Inherits Attribute
- Inheritance
-
ConditionBaseAttribute
- Derived
- Attributes
This attribute isn't inherited. Applying it to a base class will not affect derived classes.
Condition |
Initializes a new instance of the ConditionBaseAttribute class. |
Group |
Gets the group name for this attribute. This is relevant when multiple attributes that inherit ConditionBaseAttribute are present. The ShouldRun values of attributes in the same group are "OR"ed together. While the value from different groups is "AND"ed together. In other words, a test will be ignored if any group has all its ShouldRun values as false. |
Ignore |
Gets the ignore message (in case ShouldRun returns |
Should |
Gets a value indicating whether the test method or test class should be ignored. |
Produkt | Versiounen |
---|---|
MSTest.TestFramework | 3.8.0 |
Feedback zu .NET
.NET ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn: