OSConditionAttribute Třída

Definice

Tento atribut slouží k ignorování testovací třídy nebo testovací metody s volitelnou zprávou.

[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)]
[System.Runtime.CompilerServices.Nullable(0)]
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
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type OSConditionAttribute = class
    inherit ConditionBaseAttribute
Public NotInheritable Class OSConditionAttribute
Inherits ConditionBaseAttribute
Dědičnost
OSConditionAttribute
Atributy

Poznámky

Tento atribut není zděděný. Použití na základní třídu nezpůsobí ignorování odvozených tříd.

Konstruktory

Name Description
OSConditionAttribute(ConditionMode, OperatingSystems)

Inicializuje novou instanci OSConditionAttribute třídy.

OSConditionAttribute(OperatingSystems)

Inicializuje novou instanci OSConditionAttribute třídy.

Vlastnosti

Name Description
GroupName

Získá název skupiny pro tento atribut.

IgnoreMessage

Získá ignorovanou zprávu (v případě ShouldRun vrácení false).

IgnoreMessage

Získá nebo nastaví ignorovat zprávu označující důvod pro ignorování testovací metody nebo testovací třídy.

(Zděděno od ConditionBaseAttribute)
IsConditionMet

Získá hodnotu určující, zda testovací metoda nebo testovací třída by měla být ignorována.

Mode

Získá režim podmínky.

(Zděděno od ConditionBaseAttribute)
ShouldRun

Získá hodnotu určující, zda testovací metoda nebo testovací třída by měla být ignorována.

Platí pro