Exemplo n.º 1
0
        public void Test_hashCode()
        {
            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.GetHashCode() == key2.GetHashCode(), "Should be equal");
        }
        public void TestCollationKey()
        {
            Collator     coll = ILOG.J2CsMapping.Text.Collator.GetInstance(Locale.US);
            String       text = "abc";
            CollationKey key  = coll.GetCollationKey(text);

            key.GetHashCode();

            CollationKey key2 = coll.GetCollationKey("abc");

            NUnit.Framework.Assert.AreEqual(0, key.CompareTo(key2));
        }