users@jersey.java.net

Re: [Jersey] creating UriInfo in unittests

From: tarjei <tarjei_at_nu.no>
Date: Thu, 29 Apr 2010 08:28:00 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/28/2010 10:14 PM, Beatriz Nombela wrote:
> Hi,
>
> In my unit tests I use to mock that kind of objects injected in
> runtime, like UriInfo or SecurityContext. I simulate them with mockito
> framework (http://mockito.org/).
Yes, I also used to be a fan of mocks, but with Java I find that they
create too much boilerplate code so I try to avoid them as much as
possible.

Still, if nothing else fits, I guess I'll have to create mocks. Any
other ideas?

Kind regards,
Tarjei

>
> hth
> Best regards.
>
> On Wed, Apr 28, 2010 at 9:52 PM, tarjei <tarjei_at_nu.no> wrote:
> Hi, small question today :)
>
> How do I create a UriInfo object in a unittest?
>
>
> Regards,
> Tarjei Huse
> Mobil: 920 63 413
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>

- --
Tarjei Huse
Mobil: 920 63 413
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL2SbwYVRKCnSvzfIRAm/qAJ9iks3bORDGUnGYSqQ/zRXMYGkk6QCghCWa
VhvbPu+jE3HOyHPf2iKd7GY=
=t7/4
-----END PGP SIGNATURE-----