Converting string into DateTime the TestCase, Values attributes use invariant culture System.Globalization.CultureInfo.InvariantCulture. I expect that when I change the TestExecutionContext.CurrentCulture using SetCultureAttribute for test / test fixture, the converter should use the new culture info. What do you think about?
The following tests fail
[TestCase("12.10.1942")]
[SetCulture("de-DE")]
public void CanConvertStringToDateTimeInCurrentCulture(DateTime dt)
{
Assert.AreEqual(new DateTime(1942, 10, 12), dt);
}
[Test]
[SetCulture("de-DE")]
public void CanConvertStringToDateTimeInCurrentCulture([Values("12.10.1942")] DateTime dt)
{
Assert.AreEqual(new DateTime(1942, 10, 12), dt);
}
Converting
stringintoDateTimetheTestCase,Valuesattributes use invariant cultureSystem.Globalization.CultureInfo.InvariantCulture. I expect that when I change theTestExecutionContext.CurrentCultureusingSetCultureAttributefor test / test fixture, the converter should use the new culture info. What do you think about?The following tests fail