users@jersey.java.net

Re: [Jersey] Unit testing resources

From: Martin Probst <mail_at_martin-probst.com>
Date: Mon, 23 Jun 2008 14:21:49 +0200

>
> IMHO i don't really see much difference between the two from the
> perspective of the resource class. Jersey runs such unit tests without any
> issue.


Well, there is quite a difference in the amount of code you have to write
for the unit test itself, isn't it? Instead of simply e.g. calling a method
to test it, you'll have to wire up all the routes and go through HTTP. Plus
you might have to expose functionality that should be internal.

I'll see if I can somehow make it work using a custom ComponentProvider.

Regards,
Martin