What steps will reproduce the problem?
1. Build Suteki.Common.Tests project on the machine with culture where
float-point is not a dot, say ru-RU.
2. Run unit tests.
3. Get a ValidationException "Bind Failed. See ModelStateDictionary for
errors" in the Suteki.Common.Validation.ValidatingBinder's UpdateFrom
method. Test failed.
What is the expected output? What do you see instead?
Test ShouldBindCorrectValues() failed.
What version of the product are you using? On what operating system?
Suteki.Common 1.0.0.0 on localized Windows Vista.
The cure.
Edit ValidatingBinderTest.cs file so the nunit setup code should be like
that:
[SetUp]
public void SetUp()
{
Thread.CurrentThread.CurrentCulture =
CultureInfo.GetCultureInfo("en-US"); // set test's culture
validatingBinder = new ValidatingBinder(
new SimplePropertyBinder(),
new BooleanPropertyBinder());
}
Then all test run nice. Thank you!
Original issue reported on code.google.com by brainbo...@gmail.com on 7 Jun 2009 at 5:24
Original issue reported on code.google.com by
brainbo...@gmail.com
on 7 Jun 2009 at 5:24