ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Don't Let Hibernate Steal Your Identity
Subject:   What about unit testing?
Date:   2006-11-21 08:03:04
From:   dhicks
I love the ideas and have implemented them. They're working great, except for one problem.


I use RMock for a lot of unit testing, and it likes to verify that the object sent to a method is the same one it expected. Assuming we use equals() to determine object equality, then it blows up because I can't produce two objects and control their id's from the test fixture.


Has anyone else encountered this and come up with a reasonable solution?


Thanks,
Dave


1 to 1 of 1
1 to 1 of 1