Class CultureAttribute
CultureAttribute is used to mark a test fixture or an individual method as applying to a particular Culture only.
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class CultureAttribute : IncludeExcludeAttribute, IApplyToTest
- Inheritance
-
CultureAttribute
- Implements
- Inherited Members
Constructors
CultureAttribute()
Constructor with no cultures specified, for use with named property syntax.
public CultureAttribute()
CultureAttribute(string)
Constructor taking one or more cultures
public CultureAttribute(string cultures)
Parameters
cultures
stringComma-deliminted list of cultures
Methods
ApplyToTest(Test)
Causes a test to be skipped if this CultureAttribute is not satisfied.
public void ApplyToTest(Test test)
Parameters
test
TestThe test to modify
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[]