public virtual void TestListDifferentSize() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddStringToList("foo"); object2.AddStringToList("foo"); object1.AddStringToList("bar"); Assert.AreNotEqual(object1.GetHashCode(), object2.GetHashCode()); }
public virtual void TestListDifferentSize() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddStringToList("foo"); object2.AddStringToList("foo"); object1.AddStringToList("bar"); Assert.IsFalse(object1.Equals(object2)); }
public virtual void TestListSameContents() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddStringToList("foo"); object2.AddStringToList("foo"); object1.AddStringToList("bar"); object2.AddStringToList("bar"); Assert.AreEqual(object1.GetHashCode(), object2.GetHashCode()); }
public virtual void TestListSameContents() { TestObject object1 = new TestObject(); TestObject object2 = new TestObject(); object1.AddStringToList("foo"); object2.AddStringToList("foo"); object1.AddStringToList("bar"); object2.AddStringToList("bar"); Assert.IsTrue(object1.Equals(object2)); }