I'm not sure exactly what you're doing but you probably need to override
the ApplicationGlobals service such that getServletContext() returns an
appropriate mock.

If you're using junit, you might want to try the new
TapestryIOCJunit4ClassRunner. See the tapestry sources for example test
cases.
 On 17 Jul 2014 16:02, "Charlouze" <m...@charlouze.com> wrote:

> Hello everyone.
>
> I'm currently setting up an application using T5.4-b13. For unit testing, I
> use junit, unitils-dbunit, spock (with spock-tapestry and spock-unitils
> extension).
>
> In my specification I added @submodule annotation with every needed module
> (Tapestry, Jpa, beanValidator and my custom module).
>
> My problem is that there are no context and therefore, my tests do not pass
> the assert context != null in ContextResource class constructor. Does
> anyone know what can I do ?
>
> Thanks in advance
>
> Charles.
>

Reply via email to