This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
But I populate the Things on my Test class then right??
Joined: Mar 17, 2012
Daniel Afonso wrote:But I populate the Things on my Test class then right??
In your mock class. You can mock out the whole data access layer so you have one mock for your dao.
IMO, it's much better to do away with mocks and use tools like arquillian so your tests run against a test/mock database rather than mocking your classes.