users@jersey.java.net

[Jersey] Re: InMemoryTestContainerFactory

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Fri, 17 Jun 2011 11:52:13 +0200

Hi,

InMemoryTestContainer indeed does not make any HTTP calls.
It provides it's own ClientHandler, which directly invokes
the web application handleRequest method.

All that is done without changing the client API as such.

Since it is the test framework, who controls the client
creation, the client does not need to know anything
about the test framework. You just call the getClient method
which gives you the right client using the above mentioned handler
to "make" the http calls.

~Jakub

On 06/16/2011 05:53 PM, Ryan Stewart wrote:
> I haven't looked into the in-memory test stuff yet, but unless there
> have been some pretty drastic changes to the client API, I'd say
> that's not possible. The Jersey client makes HTTP calls. It wouldn't
> make a lot of sense to make it aware of a test framework that it might
> possibly be talking to.
>
> On Wed, Jun 15, 2011 at 4:10 PM, Gili <cowwoc_at_bbs.darktech.org
> <mailto:cowwoc_at_bbs.darktech.org>> wrote:
>
> Hi,
>
> How exactly does InMemoryTestContainerFactory work? Am I correct
> in assuming
> that it never binds itself to any port? Does it simply redirect
> function
> calls from the client directly to function calls on the server?
>
> Thanks,
> Gili
>
> --
> View this message in context:
> http://jersey.576304.n2.nabble.com/InMemoryTestContainerFactory-tp6480614p6480614.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>