Search in sources :

Example 6 with ComponentResourceLocator

use of org.apache.tapestry5.services.pageload.ComponentResourceLocator in project tapestry-5 by apache.

the class ComponentTemplateSourceImplTest method mockLocator.

private ComponentResourceLocator mockLocator(ComponentModel model, ComponentResourceSelector selector, Resource templateResource) {
    ComponentResourceLocator locator = newMock(ComponentResourceLocator.class);
    expect(locator.locateTemplate(model, selector)).andReturn(templateResource).once();
    return locator;
}
Also used : ComponentResourceLocator(org.apache.tapestry5.services.pageload.ComponentResourceLocator)

Aggregations

ComponentResourceLocator (org.apache.tapestry5.services.pageload.ComponentResourceLocator)6 Resource (org.apache.tapestry5.commons.Resource)5 ComponentTemplate (org.apache.tapestry5.internal.parser.ComponentTemplate)5 ClasspathResource (org.apache.tapestry5.ioc.internal.util.ClasspathResource)5 ComponentModel (org.apache.tapestry5.model.ComponentModel)5 Test (org.testng.annotations.Test)5 File (java.io.File)1 URLClassLoader (java.net.URLClassLoader)1 InvalidationListener (org.apache.tapestry5.commons.services.InvalidationListener)1