Hi, I have an issue with parsing a date during a unit test run, but I cannot reproduce it. To make it more interesting it fails when the test is run by a continuous integration process but succeeds when run within Visual Studio, and they both run on the same machine, although with a different user.
Here's the test:
[Test]
public void Test()
{
DateTime.Parse("21/12/2009", CultureInfo.CreateSpecificCulture("it-IT"));
}
(In Italian the short date format is dd/MM/yyyy)
The reason I'd expect it to fail is that I have the international settings on the machine modified so that the short date pattern for the Italian culture is dd/MM/yy, but it looks like it is either not picking it up correctly or smart enough to be able to parse it anyway, at least when I run it manually.
Any ideas how to make the test fail?