jpajunitdbunitdeltaspike

Is it possible to use Junit for Deltaspike Data Module Repository testing?


I really like using the Deltaspikes Datamodule with its Repositories. To improve in productivity and lower the Errors i am also writing Unittests via JUnit. Before i used DBUnit with Plain JPA/Hibernate inside the testcases, but i would like to test my deltaspike JPA repositories via JUnit - or maybe enhanced with DBUnit. Are there any best practises or ways how to do this? I found some integration project that combines dbunit with Deltaspike, but i was not able to getit running with Hibernate JPA Provider.

https://github.com/lbitonti/deltaspike-dbunit

Thanking you very much in advance for any help

Best regards, Shane


Solution

  • I was able to do this by using Database Rider. I really can recommend this project for all people who want to have a foll integrated JUnit 5 Test combined with Apache Deltaspikes Repository structure

    https://github.com/database-rider/database-rider