users@jersey.java.net

[Jersey] Fwd: Jersey in-memory unit test with Guice

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Wed, 04 Jul 2012 08:49:02 +0200

forwarding to jersey mailing list :)


-------- Original Message --------
Subject: Jersey in-memory unit test with Guice
Date: Tue, 3 Jul 2012 13:07:22 -0700 (PDT)
From: doug arro <doug_arro_at_yahoo.com>
Reply-To: doug arro <doug_arro_at_yahoo.com>
To: users_at_grizzly.java.net <users_at_grizzly.java.net>



Hello,
  
Jersey's in-memory test framework can be used with Guice to effectively test resource lookups without incurring HTTP expense. However, the information on this technique is dearth. I hope the example below helps spread the knowledge of this technique in the user community:
http://randomizedsort.blogspot.com/2012/07/jersey-unit-testing-with-guice-and.html
  
One suggestion out of the example. Can InMemoryTestContainerFactory be enhanced to take in an IoCComponentaContainer on the constructor so that users don't need to duplicate the Factory code to use their own container?
  
Thanks,
jersey-user