예제 #1
0
        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());
        }
예제 #2
0
        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));
        }
예제 #3
0
        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());
        }
예제 #4
0
        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));
        }