0

Anyone please tell me if there is any solution to take a test with multi- platforms. For an instance, I have a function F1 which is wrote for windows 8 English version. How can I unit test it with windows 8 Danish without have to set up this environment?

daipn
  • 21
  • 4
  • Is this what you mean? http://stackoverflow.com/questions/5001225/c-sharp-how-can-i-force-localization-culture-to-en-us-for-tests-project – Paolo May 30 '14 at 07:31
  • 1
    We need to know for which reason you need to test again this platform? Is it for the culture, than you can mock that. Is it for folders and files, then we should create fakes for is. So please give us some advice for which reason you want to do this. – Complexity May 30 '14 at 07:32

1 Answers1

0

You should try to set current culture and current UI culture for specific tests.

CultureInfo ci = new CultureInfo("da-DK");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;

You can check which string is equivalent of which culture here: http://www.csharp-examples.net/culture-names/

PiotrWolkowski
  • 8,408
  • 6
  • 48
  • 68