I looking for way how to use CDI and alternative producers in integration tests. When i speak about producers, i mean EMF producer. Reason for different EMF producer is that i want to use testing in-memory database (different persistence unit).
Is there easy way how to start CDI for integrations test and use alternative producers?
Used technologies: Java EE, JPA, CDI (weld), DeltaSpike, based on maven
After some research i found that DeltaSpike already has module called 'Test-Control', which enable use CDI in tests. So i decided to extend current EMF producer to read name of persistence unit from property file which contains configuration. Different property files in
src/main/resources
andsrc/test/resources
lets me use different persistence unit for integration tests.