[monotouch-test] Make BundleTest.TestPreferredLocalizations laxer. (#4005)

Change test to verify that all preferred localizations are in the list of
available localizations (instead of hardcoding an expected result of 'en').

This makes the TestPreferredLocalizations work if the device language is 'es',
in which case the preferred language between 'en' and 'es' is obviously 'es'.
This commit is contained in:
Rolf Bjarne Kvinge 2018-04-27 18:00:17 +02:00 коммит произвёл Sebastien Pouliot
Родитель 1720883c60
Коммит f7ce5b91c5
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -179,7 +179,8 @@ namespace MonoTouchFixtures.CoreFoundation {
var preferred = new string [] {"en", "es"};
var used = CFBundle.GetPreferredLocalizations (preferred);
Assert.IsTrue (used.Length > 0);
Assert.That (used, Has.Exactly (1).EqualTo ("en"));
foreach (var u in used)
Assert.That (preferred, Contains.Item (u), u);
}
[Test]