users@jersey.java.net

[Jersey] Jersey test framework

From: Yoryos <valotas_at_gmail.com>
Date: Tue, 5 Jul 2011 14:24:30 +0300

Hello,
I'm trying to use the jersey test framework with guice but can't make it
work. I've got two resource classes without any constructor dependency and
one that needs an injection of a pojo to work. The project runs just fine
but I would like to create some tests and so tried the to do so having a
look at the guice-filter
sample<http://download.java.net/maven/2/com/sun/jersey/samples/guicefilter-webapp/1.8/guicefilter-webapp-1.8-project.zip>.
The test framework finds the resource classes (all 3 of them) but fails with
the message:

SEVERE: The following errors and warnings have been detected with resource
and/or provider classes:
SEVERE: Missing dependency for constructor public
com.xxx.xxx.rest.rs.SimpleDomainResource(com.xxx.xxx.DomainService) at
parameter index 0

The SimpleDomainResource has a constructor marked with @Inject which
expects as an argument the DomainService class.

Any hints?

Y.