I have problem with unit tests for persistance stuff written in spring data jpa.
For particular repositories I have a unit tests to be sure that everything works correctly. Also I have a integration tests. Each tests are passed when I run it for particular test classes. But when i run a whole package of tests I got a lot of faliures because I have records inserted into DB from previous tests.
Of course in each test classes I can add @After method to clean each data but I would like to ask that it posible to clean all data from DB before run tests from particular test classes without adding @After method?
Best Regards.
Aucun commentaire:
Enregistrer un commentaire