Search in sources :

Example 36 with MetaDataLocator

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

the class PageImplTest method get_by_nested_id_for_blank_value_returns_root_component.

@Test
public void get_by_nested_id_for_blank_value_returns_root_component() {
    ComponentPageElement root = mockComponentPageElement();
    MetaDataLocator locator = newMetaDataLocator(LOGICAL_PAGE_NAME, true);
    replay();
    Page page = new PageImpl(LOGICAL_PAGE_NAME, selector, null, perThreadManager, locator);
    page.setRootElement(root);
    assertSame(page.getComponentElementByNestedId(""), root);
    verify();
}
Also used : MetaDataLocator(org.apache.tapestry5.services.MetaDataLocator) Test(org.testng.annotations.Test)

Example 37 with MetaDataLocator

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

the class InternalBaseTestCase method neverWhitelistProtected.

protected final MetaDataLocator neverWhitelistProtected() {
    MetaDataLocator l = mockMetaDataLocator();
    expect(l.findMeta(EasyMock.anyObject(String.class), EasyMock.anyObject(String.class), EasyMock.eq(boolean.class))).andReturn(false);
    return l;
}
Also used : MetaDataLocator(org.apache.tapestry5.services.MetaDataLocator)

Aggregations

MetaDataLocator (org.apache.tapestry5.services.MetaDataLocator)37 Test (org.testng.annotations.Test)32 Request (org.apache.tapestry5.http.services.Request)18 ComponentClassResolver (org.apache.tapestry5.services.ComponentClassResolver)13 LocalizationSetter (org.apache.tapestry5.services.LocalizationSetter)13 Response (org.apache.tapestry5.http.services.Response)12 ComponentModel (org.apache.tapestry5.model.ComponentModel)11 ComponentResources (org.apache.tapestry5.ComponentResources)9 SymbolSource (org.apache.tapestry5.ioc.services.SymbolSource)9 PageRenderRequestParameters (org.apache.tapestry5.services.PageRenderRequestParameters)8 EmptyEventContext (org.apache.tapestry5.internal.EmptyEventContext)7 ComponentEventRequestParameters (org.apache.tapestry5.services.ComponentEventRequestParameters)6 Dispatcher (org.apache.tapestry5.http.services.Dispatcher)5 ComponentRequestHandler (org.apache.tapestry5.services.ComponentRequestHandler)5 PageLifecycleListener (org.apache.tapestry5.runtime.PageLifecycleListener)4 ComponentEventLinkEncoder (org.apache.tapestry5.services.ComponentEventLinkEncoder)4 ClientWhitelist (org.apache.tapestry5.services.security.ClientWhitelist)4 URLEventContext (org.apache.tapestry5.internal.URLEventContext)2 PersistentFieldStrategy (org.apache.tapestry5.services.PersistentFieldStrategy)2 Link (org.apache.tapestry5.http.Link)1