Package org.apache.tapestry

Examples of org.apache.tapestry.ComponentResources


public class BeanEditFormTest extends TapestryTestCase
{
    @Test
    public void object_created_as_needed()
    {
        ComponentResources resources = mockComponentResources();
        ComponentResources containerResources = mockComponentResources();
        BeanModelSource source = mockBeanModelSource();
        BeanModel model = mockBeanModel();
        Environment environment = mockEnvironment();

        expect(resources.triggerEvent(Form.PREPARE, null, null)).andReturn(false);
View Full Code Here


    }

    @Test
    public void object_can_not_be_instantiated()
    {
        ComponentResources resources = mockComponentResources();
        Location l = mockLocation();
        Environment environment = mockEnvironment();

        expect(resources.triggerEvent(Form.PREPARE, null, null)).andReturn(false);

        train_push(environment, PropertyEditContext.class);

        train_getBoundType(resources, Runnable.class);
View Full Code Here

    @Test
    public void trigger_deferred()
    {
        Request request = mockRequest();
        ComponentResources resources = mockComponentResources();
        FormSupportImpl support = new FormSupportImpl();

        String elementName = "myname";

        train_getParameter(request, elementName, "login");

        replay();

        Submit submit = new Submit(request);

        submit.setup(resources, support, null);

        submit.processSubmission(support, elementName);

        verify();

        expect(resources.triggerEvent(Submit.SELECTED_EVENT, null, null)).andReturn(false);

        replay();

        support.executeDeferred();
View Full Code Here

    @Test
    public void trigger_immediate()
    {
        FormSupport support = mockFormSupport();
        ComponentResources resources = mockComponentResources();
        Heartbeat heartbeat = new HeartbeatImpl();
        Request request = mockRequest();

        String elementName = "myname";

        train_getParameter(request, elementName, "login");

        replay();

        heartbeat.begin();

        Submit submit = new Submit(request);

        submit.setup(resources, support, heartbeat);
        submit.setDefer(false);

        submit.processSubmission(support, elementName);

        verify();

        expect(resources.triggerEvent(Submit.SELECTED_EVENT, null, null)).andReturn(false);

        replay();

        heartbeat.end();
View Full Code Here

public class MetaDataLocatorImplTest extends InternalBaseTestCase
{
    @Test
    public void found_in_component()
    {
        ComponentResources resources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
        String value = "zaphod";
View Full Code Here

    }

    @Test
    public void found_in_container()
    {
        ComponentResources resources = mockComponentResources();
        ComponentResources containerResources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentModel containerModel = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
View Full Code Here

    }

    @Test
    public void found_via_high_level_default()
    {
        ComponentResources resources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
        String value = "zaphod";
View Full Code Here

    }

    @Test
    public void default_matching_is_case_insensitive()
    {
        ComponentResources resources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
        String value = "zaphod";
View Full Code Here

    }

    @Test
    public void subfolder_default_overrides_high_level_default()
    {
        ComponentResources resources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
        String value = "zaphod";
View Full Code Here

    }

    @Test
    public void test_cache_cleared()
    {
        ComponentResources resources = mockComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentClassResolver resolver = mockComponentClassResolver();

        String key = "foo.bar";
        String value = "zaphod";
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ComponentResources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.