<PackageReference Include="NUnit" Version="3.4.1" />

PlatformHelper

public class PlatformHelper
PlatformHelper class is used by the PlatformAttribute class to determine whether a platform is supported.
public const string OSPlatforms = "Win,Win32,Win32S,Win32NT,Win32Windows,WinCE,Win95,Win98,WinMe,NT3,NT4,NT5,NT6,Win2008Server,Win2008ServerR2,Win2012Server,Win2012ServerR2,Win2K,WinXP,Win2003Server,Vista,Win7,Windows7,Win8,Windows8,Win8.1,Windows8.1,Win10,Windows10,WindowsServer10,Unix,Linux,Xbox,MacOSX"

Comma-delimited list of all supported OS platform constants

public static readonly string RuntimePlatforms

Comma-delimited list of all supported Runtime platform constants

public string Reason { get; }

Return the last failure reason. Results are not defined if called before IsSupported( Attribute ) is called.

public PlatformHelper()

Default constructor uses the operating system and common language runtime of the system.

Construct a PlatformHelper for a particular operating system and common language runtime. Used in testing.

public bool IsPlatformSupported(string[] platforms)

Test to determine if one of a collection of platforms is being used currently.

public bool IsPlatformSupported(PlatformAttribute platformAttribute)

Tests to determine if the current platform is supported based on a platform attribute.

public bool IsPlatformSupported(TestCaseAttribute testCaseAttribute)

Tests to determine if the current platform is supported based on a platform attribute.

public bool IsPlatformSupported(string platform)

Test to determine if the a particular platform or comma- delimited set of platforms is in use.