Reputation: 565
I'm new to testing and this is case:
What I have done so far: 1. Mocked the classes and the input/output objects of the manip class. This has worked well. 2. Tested the REST using Jersey Test with my h2 db as test db.
My Q: How can I test the individual parts of the application without any dependency on the DB? As in, I want to eliminated the actual writing/reading to the test DB and mock that too. Is that possible? these are the basic cases I would like to test:
please let me know if I haven't been clear. Thanks.
Upvotes: 0
Views: 367
Reputation: 1097
You could use a test database such as: Apache Derby (JavaDB), Hypersonic, H2, HSQLDB...
Here you can find more details on integration testing with file or in-memory persiste: http://www.oracle.com/technetwork/articles/java/integrationtesting-487452.html
Upvotes: 1