Table of Contents

Class CultureDetector

Namespace
NUnit.Framework.Internal
Assembly
nunit.framework.dll

CultureDetector is a helper class used by NUnit to determine whether a test should be run based on the current culture.

public class CultureDetector
Inheritance
CultureDetector
Inherited Members

Constructors

CultureDetector()

Default constructor uses the current culutre.

public CultureDetector()

CultureDetector(string)

Contruct a CultureDetector for a particular culture for testing.

public CultureDetector(string culture)

Parameters

culture string

The culture to be used

Properties

Reason

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

public string Reason { get; }

Property Value

string

Methods

IsCultureSupported(CultureAttribute)

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

public bool IsCultureSupported(CultureAttribute cultureAttribute)

Parameters

cultureAttribute CultureAttribute

The attribute to examine

Returns

bool

IsCultureSupported(string)

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

public bool IsCultureSupported(string culture)

Parameters

culture string

Name of the culture or comma-separated list of culture ids

Returns

bool

True if the culture is in use on the system

IsCultureSupported(string[])

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

public bool IsCultureSupported(string[] cultures)

Parameters

cultures string[]

Returns

bool