Mercurial > repos > IBBoard.NUnit
diff AbstractEqualityTest.cs @ 12:29850b7c8f33
* Add test for hashcodes to equality test - we can't guarantee more than this
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 26 Oct 2011 15:00:49 +0100 |
parents | 1ed310d10fc9 |
children |
line wrap: on
line diff
--- a/AbstractEqualityTest.cs Sat Sep 24 11:58:29 2011 +0100 +++ b/AbstractEqualityTest.cs Wed Oct 26 15:00:49 2011 +0100 @@ -51,6 +51,13 @@ } } + [Test] + public void TestHashcode() + { + Assert.AreEqual(GetObject().GetHashCode(), GetSameObject().GetHashCode()); + Assert.AreEqual(GetSameObject().GetHashCode(), GetObject().GetHashCode()); + } + public abstract TEST_CLASS GetObject(); public abstract TEST_CLASS GetSameObject();