users@jersey.java.net

[Jersey] Re: How to use JAX-RS Application with Jersey Test Framework?

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Wed, 15 Aug 2012 10:39:03 +0200

Hello Markus,

this functionality is already implemented in Jersey 2.0 milestones;
there is no direct way how to achieve this in Jersey 1.x, but if you can
create ResourceConfig from your application (DefaultResourceConfig could
be what you need), you can use that with LowLevelAppDescriptor (see
JerseyTest(AppDescriptor ad) or JerseyTest.configure()).

Regards,
Pavel



On 8/10/12 2:56 PM, Markus Karg wrote:
>
> The Jersey Test Framework automatically scans all packages given to
> the constructor and finds the root resource and all providers. But it
> does not find a JAX-RS Application located in the same package. The
> problem is that I want to write an integration test that tests exactly
> that JAX-RS Application instance, not just the resources it is made
> of. How to tell the framework that ignore the resources and instead
> set up the Application?
>
> Thanks!
>
> Markus
>