Hi Iva, As far as I see from your sample, the test crashes when producing the EntityManager (NullPointer from the injected EntityManagerFactory). I'm more familiar with Arquillian, anyone experience how this is done with testcontrol?
On Thu, Feb 11, 2016 at 4:56 AM, Ivá Conte <[email protected]> wrote: > Hi, > I'm trying to inject a deltaspike data repository into my junit tests > with no luck so far. I've got the following exception : > > IINFORMAÇÕES: [failed] > > br.com.tramponaweb.test.service.DeltaSpikeDataTest#mustCallCandidatoRepository > message: Failed calling Repository: > > [Repository=br.com.tramponaweb.repository.CandidatoRepository,entity=br.com.tramponaweb.model.Candidato,method=findAll,exception=class > org.apache.deltaspike.data.api.QueryInvocationException,message=Failed > calling Repository: > > [Repository=br.com.tramponaweb.repository.CandidatoRepository,entity=br.com.tramponaweb.model.Candidato,method=findAll,exception=class > org.apache.deltaspike.data.api.QueryInvocationException,message=Failed > calling Repository: > > [Repository=br.com.tramponaweb.repository.CandidatoRepository,entity=br.com.tramponaweb.model.Candidato,method=findAll,exception=class > java.lang.reflect.InvocationTargetException,message=null > > However, when I try to inject a regular class with simple methods, > test-control module works as expected. > Could you give me some help with it? > > here's a link for my test classes: > > https://bitbucket.org/iconte/tramponaweb-web/src/5f75237f0ff2/src/test/java/br/com/tramponaweb/test/service/?at=master > > Regards, > Iva Conte >
