deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Li <michael...@gmail.com>
Subject Unit test DeltaSpike Data repositories
Date Wed, 30 Apr 2014 18:24:33 GMT
We're currently using CDI-Unit for CDI components testing. However, I can't
inject my data repository (interface) into my unit test classes. I am
wondering if there is anything special to setup (to work with CDI-Unit) or
other approach to unit test repository. The exception I got is pasted as
below.


org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied
dependencies for type DomainRepository with qualifiers @Default
  at injection point [UnbackedAnnotatedField] @Inject
com.acme.server.repository.DomainRepositoryTest.domainRepository
  at
com.acme.server.repository.DomainRepositoryTest.domainRepository(DomainRepositoryTest.java:0)

at
org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)
at
org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)
at
org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at
org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at
org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at
org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)



Thanks.

-- 
Michael Li

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message