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); }
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()); }