public void Should_provide_correct_hash_codes() { var id1 = Guid.NewGuid(); var id2 = Guid.NewGuid(); var user1a = new DO(id1, 1); var user1b = new DO(id1, 2); var user2 = new DO(id2, 2); Assert.Equal(user1a.GetHashCode(), user1b.GetHashCode()); Assert.NotEqual(user1a.GetHashCode(), user2.GetHashCode()); }