Include culture setting in Unit-Tests

Dec 8, 2009 at 7:23 AM

Hi,

just a quick tip for the next revision: Include a culture setting in the base class of the unit tests.

Took me 15 min to figure out, and I learned something :-) Now all is green again..

But the project looks very promising, and very well maintained, so I thought I "contribute" a bit.

I simply added:

[TestFixtureSetUp]
    protected void TestSetup()
    {
        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
        Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");

    }

in the TestFixtureBase. Btw, the first line makes the number happy (2,2 vs 2.2 in German), the second line makes sure the Exceptions are in english.

My 2 cents,

Chris

PS: Not really a bug, more a comfort thing for unexperienced users like me :-)

 

Coordinator
Dec 9, 2009 at 4:40 AM

You did find a bug: Dictionary property names weren't culture agnostic.

Fixed and checked into CodePlex. Thanks!