Поделиться через


OSConditionAttribute Class

Definition

This attribute is used to ignore a test class or a test method, with an optional message.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class OSConditionAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.ConditionBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type OSConditionAttribute = class
    inherit ConditionBaseAttribute
Public NotInheritable Class OSConditionAttribute
Inherits ConditionBaseAttribute
Inheritance
OSConditionAttribute
Attributes

Remarks

This attribute isn't inherited. Applying it to a base class will not cause derived classes to be ignored.

Constructors

OSConditionAttribute(ConditionMode, OperatingSystems)

Initializes a new instance of the OSConditionAttribute class.

OSConditionAttribute(OperatingSystems)

Initializes a new instance of the OSConditionAttribute class.

Properties

GroupName

Gets the group name for this attribute.

IgnoreMessage

Gets the ignore message (in case ShouldRun returns false).

ShouldRun

Gets a value indicating whether the test method or test class should be ignored.

Applies to