示例#1
0
        public void Test_equalsLjava_lang_Object()
        {
            Collator collator = ILOG.J2CsMapping.Text.Collator.GetInstance();

            collator.SetStrength(ILOG.J2CsMapping.Text.Collator.PRIMARY);
            CollationKey key1 = collator.GetCollationKey("abc");
            CollationKey key2 = collator.GetCollationKey("ABC");

            NUnit.Framework.Assert.IsTrue(key1.Equals(key2), "Should be equal");
        }
示例#2
0
 private void Report(String localeName, String string1, CollationKey k1, CollationKey k2)
 {
     if (!k1.Equals(k2))
     {
         StringBuilder msg = new StringBuilder();
         msg.Append("With ").Append(localeName).Append(" collator\n and input string: ").Append(string1).Append('\n');
         msg.Append(" failed to produce identical keys on both collators\n");
         msg.Append("  localeCollator key: ").Append(CollationTest.Prettify(k1)).Append('\n');
         msg.Append("  ruleCollator   key: ").Append(CollationTest.Prettify(k2)).Append('\n');
         Errln(msg.ToString());
     }
 }