System.Collections.Tests.CaseInsensitiveHashCodeProviderTests.Ctor_CultureInfo_GetHashCodeCompare_TurkishI C# (CSharp) Method

Ctor_CultureInfo_GetHashCodeCompare_TurkishI() private method

private Ctor_CultureInfo_GetHashCodeCompare_TurkishI ( ) : void
return void
        public static void Ctor_CultureInfo_GetHashCodeCompare_TurkishI()
        {
            var cultureNames = new string[]
            {
                "cs-CZ","da-DK","de-DE","el-GR","en-US",
                "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
                "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
                "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
                "zh-CN","zh-HK","zh-TW"
            };

            foreach (string cultureName in cultureNames)
            {
                CultureInfo culture;
                try
                {
                    culture = new CultureInfo(cultureName);
                }
                catch (CultureNotFoundException)
                {
                    continue;
                }

                var provider = new CaseInsensitiveHashCodeProvider(culture);

                // Turkish has lower-case and upper-case version of the dotted "i", so the upper case of "i" (U+0069) isn't "I" (U+0049)
                // but rather "İ" (U+0130)
                Assert.Equal(
                    culture.Name != "tr-TR",
                    provider.GetHashCode("file") == provider.GetHashCode("FILE"));
            }
        }