I want to prepare SQL
data once per Spec and remove it after Spec is completed. It should be done by Spring service
As I understand I can do following:
- I can do it in
setup:
but it will lead to too many useless inserts/rollbacks (if I've got few data-driven tests) - I can use
@BeforeTransaction
(check this example) - how to clear data after test is completed?