Table of Contents

Class PlatformAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

Marks an assembly, test fixture or test method as applying to a specific platform.

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
public class PlatformAttribute : IncludeExcludeAttribute, IApplyToTest
Inheritance
PlatformAttribute
Implements
Inherited Members

Constructors

PlatformAttribute()

Constructor with no platforms specified, for use with named property syntax.

public PlatformAttribute()

PlatformAttribute(string?)

Constructor taking one or more platforms

public PlatformAttribute(string? platforms)

Parameters

platforms string

Comma-delimited list of platforms

Methods

ApplyToTest(Test)

Causes a test to be skipped if this PlatformAttribute is not satisfied.

public void ApplyToTest(Test test)

Parameters

test Test

The test to modify