You can simulate a request by instantiating GuiceFilter() and passing it a
mock request and response. If you have previously installed a configured
ServletModule, it will execute the servlets + filters registered in the GS2
pipeline.
Dhanji.
On Sat, Jun 13, 2009 at 5:12 AM, naaka wrote:
>
> than
thanks dhanji.
but what other ways do i have for testing ?
i wanted to do some integration testing and i need to have everything
injected by the container.
nicola
On Jun 12, 6:32 pm, "Dhanji R. Prasanna" wrote:
> You should bind @RequestScoped and @SessionScoped to your own mock Scope
> im
You should bind @RequestScoped and @SessionScoped to your own mock Scope
implementation. Then Guice will use this instead of its default HTTP scopes.
In this case you want to omit the ServletModule in your test.
MockRequestScope myMockScope = new MockRequestScope();
bindScope(RequestScoped.class, m
hi,
i tried out google guice and it looks great.
i have tdd-ed a small spike with persistence and singleton/no scopes
and every worked fine.
now i have added the servlet-guice extension, and changed a class to
session scope, but my test complaint:
com.google.inject.ProvisionException: Guice pro