예제 #1
0
        public virtual void testEquals()
        {
            JDFException x1 = new JDFException("foo");
            JDFException x2 = new JDFException("bar");

            Assert.AreNotEqual(x1, x2);
            x1 = new JDFException("foo", 42);
            x2 = new JDFException("bar", 42);
            Assert.AreEqual(x1, x2);
        }
예제 #2
0
        public virtual void testHash()
        {
            JDFException x1 = new JDFException("foo");
            JDFException x2 = new JDFException("bar");

            Assert.IsTrue(x1.GetHashCode() != x2.GetHashCode());
            x1 = new JDFException("foo", 42);
            x2 = new JDFException("bar", 42);
            Assert.AreEqual(x1.GetHashCode(), x2.GetHashCode());
        }