Esempio n. 1
0
        public void TestKeywordValues()
        {
            String[] kwVals;
            bool     foundStandard = false;
            int      n;

            Logln("Testing getting collation values:");
            kwVals = ICUResourceBundle.GetKeywordValues(ICUData.IcuCollationBaseName, COLLATION_RESNAME, CollationData.IcuDataAssembly);
            for (n = 0; n < kwVals.Length; n++)
            {
                Logln(n.ToString(CultureInfo.InvariantCulture) + ": " + kwVals[n]);
                if (DEFAULT_NAME.Equals(kwVals[n]))
                {
                    Errln("getKeywordValues for collation returned 'default' in the list.");
                }
                else if (STANDARD_NAME.Equals(kwVals[n]))
                {
                    if (foundStandard == false)
                    {
                        foundStandard = true;
                        Logln("found 'standard'");
                    }
                    else
                    {
                        Errln("Error - 'standard' is in the keyword list twice!");
                    }
                }
            }

            if (foundStandard == false)
            {
                Errln("Error - 'standard' was not in the collation tree as a keyword.");
            }
            else
            {
                Logln("'standard' was found as a collation keyword.");
            }
        }