public virtual void TestDictionaryContentsDifferentKey() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddDictionaryEntry("key1", "value1"); object2.AddDictionaryEntry("key1", "value1"); object1.AddDictionaryEntry("key3", "value2"); object2.AddDictionaryEntry("key2", "value2"); Assert.IsFalse(object1.Equals(object2)); }
public virtual void TestDictionaryContentsDifferentKey() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddDictionaryEntry("key1", "value1"); object2.AddDictionaryEntry("key1", "value1"); object1.AddDictionaryEntry("key3", "value2"); object2.AddDictionaryEntry("key2", "value2"); Assert.AreNotEqual(object1.GetHashCode(), object2.GetHashCode()); }
public virtual void TestDictionaryContentsSame() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddDictionaryEntry("key1", "value1"); object2.AddDictionaryEntry("key1", "value1"); object1.AddDictionaryEntry("key2", "value2"); object2.AddDictionaryEntry("key2", "value2"); Assert.IsTrue(object1.Equals(object2)); }