Ejemplo n.º 1
0
        public void T_GetHashCode_OrderMatters()
        {
            ChainKey ck        = new ChainKey(new string[] { "word1", "word2" });
            ChainKey ckEqual   = new ChainKey(new string[] { "word1", "word2" });
            ChainKey ckReverse = new ChainKey(new string[] { "word2", "word1" });

            Assert.AreEqual(ck.GetHashCode(), ckEqual.GetHashCode());
            Assert.AreNotEqual(ck.GetHashCode(), ckReverse.GetHashCode());
        }
Ejemplo n.º 2
0
        public void T_GetHashCode_SimpleDifferent()
        {
            ChainKey ck1 = new ChainKey(new string[] { "", "this" });
            ChainKey ck2 = new ChainKey(new string[] { "do", "this" });

            Assert.AreNotEqual(ck1.GetHashCode(), ck2.GetHashCode());
        }