private void InitializeInstanceFields() { analyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, collator); firstRangeBeginning = new BytesRef(collator.getCollationKey(firstRangeBeginningOriginal).toByteArray()); firstRangeEnd = new BytesRef(collator.getCollationKey(firstRangeEndOriginal).toByteArray()); secondRangeBeginning = new BytesRef(collator.getCollationKey(secondRangeBeginningOriginal).toByteArray()); secondRangeEnd = new BytesRef(collator.getCollationKey(secondRangeEndOriginal).toByteArray()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testCollationKeySort() throws Exception public virtual void testCollationKeySort() { Analyzer usAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.US)); Analyzer franceAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.FRANCE)); Analyzer swedenAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("sv", "se"))); Analyzer denmarkAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("da", "dk"))); // The ICU Collator and Sun java.text.Collator implementations differ in their // orderings - "BFJDH" is the ordering for java.text.Collator for Locale.US. testCollationKeySort(usAnalyzer, franceAnalyzer, swedenAnalyzer, denmarkAnalyzer, oStrokeFirst ? "BFJHD" : "BFJDH", "EACGI", "BJDFH", "BJDHF"); }