Example #1
0
        public virtual void EqualsItselfTest()
        {
            Point first = new Point(1.23, 1.1);

            NUnit.Framework.Assert.IsTrue(first.Equals(first));
            NUnit.Framework.Assert.AreEqual(first.GetHashCode(), first.GetHashCode());
        }
Example #2
0
        public virtual void CloneTest()
        {
            Point first = new Point(1.23, 1.1);
            Point clone = (Point)first.Clone();

            NUnit.Framework.Assert.AreEqual(first, clone);
            NUnit.Framework.Assert.AreEqual(first.GetHashCode(), clone.GetHashCode());
        }
Example #3
0
        public virtual void EqualsToAnotherPointTest()
        {
            Point first  = new Point(1.23, 1.1);
            Point second = new Point(1.23, 1.1);

            NUnit.Framework.Assert.IsTrue(first.Equals(second));
            NUnit.Framework.Assert.IsTrue(second.Equals(first));
            NUnit.Framework.Assert.AreEqual(first.GetHashCode(), second.GetHashCode());
        }