Class CultureDetector
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
stringThe 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
Methods
IsCultureSupported(CultureAttribute)
Tests to determine if the current culture is supported based on a culture attribute.
public bool IsCultureSupported(CultureAttribute cultureAttribute)
Parameters
cultureAttribute
CultureAttributeThe attribute to examine
Returns
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
stringName 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[]