hi michael, you could try [1] instead.
regards, gerhard [1] http://deltaspike.apache.org/test-control.html http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2014-04-30 20:24 GMT+02:00 Michael Li <[email protected]>: > 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 >
