-
Notifications
You must be signed in to change notification settings - Fork 158
SetUICulture Attribute
jnm2 edited this page Jun 14, 2017
·
3 revisions
The SetUICulture attribute is used to set the current UI Culture for the duration of a test. It may be specified at the level of a test or a fixture. The UI culture remains set until the test or fixture completes and is then reset to its original value. If you wish to use the current culture setting to decide whether to run a test, use the Culture attribute instead of this one.
Only one culture may be specified. Running a test under multiple cultures is a planned future enhancement. At this time, you can achieve the same result by factoring out your test code into a private method that is called by each individual test method.
namespace NUnit.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
[SetUICulture("fr-FR")]
public class FrenchCultureTests
{
// ...
}
}
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator
- NUnit Analyzers