Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Resource


    }

    @Test
    public void namespaced_element()
    {
        Resource resource = getResource("namespaced_element.tml");

        ComponentTemplate template = getParser().parseTemplate(resource);

        assertSame(template.getResource(), resource);
View Full Code Here


        MultiKey key = new MultiKey(componentName, locale);

        // First cache is key to resource.

        Resource resource = templateResources.get(key);

        if (resource == null)
        {
            resource = locateTemplateResource(componentModel, locale);
            templateResources.put(key, resource);
View Full Code Here

    {
        ComponentModel model = initialModel;
        while (model != null)
        {

            Resource baseResource = baseResourceForModel(model);
            Resource localized = baseResource.forLocale(locale);

            // In a race condition, we may hit this method a couple of times, and overwrite previous
            // results with identical new results.

            // If found a properly localized version of the base resource for the model,
View Full Code Here

    private static final String CLASS_NAME = "org.example.components.Foo";

    @Test
    public void root_class_vs_sub_class()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

    }

    @Test
    public void add_new_parameter()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

    }

    @Test
    public void parameter_names_are_sorted()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

    }

    @Test
    public void declared_parameter_names_does_not_include_superclass_parameters()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();
        ComponentModel parent = mockComponentModel();

        train_getPersistentFieldNames(parent);
        train_getParameterNames(parent, "betty");
View Full Code Here

    }

    @Test
    public void add_duplicate_parameter()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

    }

    @Test
    public void get_parameter_by_name_with_no_parameters_defined()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

    }

    @Test
    public void get_unknown_parameter()
    {
        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.Resource

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.