SetUICulture - Possible problem?

3 views
Skip to first unread message

Rob Ashton

unread,
Dec 17, 2009, 7:09:01 AM12/17/09
to NUnit-Discuss
Hi guys,

Before I step my foot in it and raise it as a bug, I'm going to assume
it's down to user errors

I've got a test which I'm running which uses SetUICulture like thus:

[SetUICulture("fr-FR")]
[Test]
public void GetTranslation_UsesUICulture()
{
// Mock blah etc
// Call service blah
}

Inside the service I'm testing, I get the current Ui Culture like
thus:

String locale = CultureInfo.CurrentUICulture.Name;

No matter what I do, that comes back as en-US

If I use

[SetCulture("fr-FR")]

Then CultureInfo.CurrentCulture seems to be set to fr-FR as expected.

Am I potentially doing something wrong? Is this just an oversight? I
notice that I can't find SetUICulture in the documentation yet -
although it was added in august?

Thanks in advance,

Rob Ashton

Reply all
Reply to author
Forward
0 new messages