Paul Field wrote:
> Mats Henricson <m...@henricson.se> wrote on 10/09/2009 14:59:32:
>> How should we make Testify aware of asset and context?
>> For example, we have this in our TML:
>>    ${context:/foo/bar/}
>> Currently testify barfs at us like this:
>>
>> Caused by: java.lang.RuntimeException: Unable to locate asset
>> 'context:foo/bar' (the file does not exist).
> 
> The TapestryTester has two constructors:
>     public TapestryTester(String appPackage, String appName, String 
> contextPath, Class<?>... moduleClasses)
>     public TapestryTester(String appPackage, Class<?>... moduleClasses)
> 
> In the first one you can define the path to the context; the second one 
> defaults to "src/main/webapp".
> 
> I believe this is with respect to the working directory that the test 
> process runs with.
> 
> So, if you have an error about the file not existing, I would check that 
> you are using the appropriate constructor (depending on whether the 
> default works for you) and whether you are running with the working 
> directory set to your project directory.

Not much success, unfortunately. This is what I do:

    public static final String APP_PACKAGE = "dummy";
    private static final String APP_NAME = "betting";
    private static final String CONTEXT_PATH = "src/main/webapp/";

    protected static final TapestryTester SHARED_TESTER =
       new TapestryTester(APP_PACKAGE, APP_NAME,
                          PageTester.DEFAULT_CONTEXT_PATH,
                          PageTestModule.class);

I still get:

   Unable to locate asset 'context:foo/bar' (the file does not exist).

Mats

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to