SkipIfAttribute Class

Skips the test when every condition defined by the attribute matches; otherwise the test runs.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class SkipIfAttribute : ConditionalTestAttributeBase

Remarks

The attribute can be applied to a test method and to its test class. When both define a condition, the test is skipped when either of them matches.

Inheritance
ConditionalTestAttributeBase SkipIfAttribute

Constructors

NameDescription
SkipIfAttribute()Initializes a new instance of the SkipIfAttribute class. At least one condition must be set using the properties of the attribute.
SkipIfAttribute(TestGlobalizationMode)Initializes a new instance of the SkipIfAttribute class.
SkipIfAttribute(TestOperatingSystems)Initializes a new instance of the SkipIfAttribute class.
SkipIfAttribute(TestOperatingSystems, TestGlobalizationMode)Initializes a new instance of the SkipIfAttribute class.
SkipIfAttribute(WindowsGroups)Initializes a new instance of the SkipIfAttribute class.

SkipIfAttribute overloads

SkipIfAttribute()

SkipIfAttribute.cs

Initializes a new instance of the SkipIfAttribute class. At least one condition must be set using the properties of the attribute.

public SkipIfAttribute()

SkipIfAttribute(TestGlobalizationMode)

SkipIfAttribute.cs

Initializes a new instance of the SkipIfAttribute class.

public SkipIfAttribute(TestGlobalizationMode globalizationMode)
Parameters
globalizationMode TestGlobalizationMode
The globalization mode the test is skipped in.

SkipIfAttribute(TestOperatingSystems)

SkipIfAttribute.cs

Initializes a new instance of the SkipIfAttribute class.

public SkipIfAttribute(TestOperatingSystems operatingSystem)
Parameters
operatingSystem TestOperatingSystems
The operating systems the test is skipped on.

SkipIfAttribute(TestOperatingSystems, TestGlobalizationMode)

SkipIfAttribute.cs

Initializes a new instance of the SkipIfAttribute class.

public SkipIfAttribute(TestOperatingSystems operatingSystem, TestGlobalizationMode globalizationMode)
Parameters
operatingSystem TestOperatingSystems
The operating systems the test is skipped on.
globalizationMode TestGlobalizationMode
The globalization mode the test is skipped in.

SkipIfAttribute(WindowsGroups)

SkipIfAttribute.cs

Initializes a new instance of the SkipIfAttribute class.

public SkipIfAttribute(WindowsGroups windowsGroup)
Parameters
windowsGroup WindowsGroups
The Windows group membership that causes the test to be skipped.