TapestryTester has two constructors
http://tapestrytestify.sourceforge.net/apidocs/com/formos/tapestry/testify/core/TapestryTester.html

Which one are you using? Are you passing in a context path?


On 26 March 2013 09:19, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:

> Hello!
>
> My Testify tests work fine as long as I do not import files from the
> context like:
>
> | @Import(stylesheet = "context:styles/layout.css")
>
> Then I get an exception like:
>
> | Caused by: java.lang.RuntimeException: Unable to locate asset
> 'context:styles/layout.css' (the file does not exist).
> |       at
>
> org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:137)
> |       at
>
> org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:107)
> |       at
>
> org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:87)
>
> I stepped through the code and found that in
> ContextResource#resolveURL() the context is used to retrieve the "real
> file". But the PageTesterContext always returns null:
>
> | /**
> |  * Always returns null.
> |  */
> | public File getRealFile(String path)
> | {
> |     return null;
> | }
>
> Does anyone know how to handle this correctly?
>
> TIA
>  Stephan
>
>

Reply via email to