Table of Contents

Class PlatformAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

PlatformAttribute is used to mark a test fixture or an individual method as applying to a particular platform only.

[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