Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Location


        Page page = newPage(PAGE_NAME);
        Component pageComponent = mockComponent();
        ComponentModel model = mockComponentModel();
        ComponentPageElement child1 = mockComponentPageElement();
        ComponentPageElement child2 = mockComponentPageElement();
        Location l = mockLocation();
        Logger logger = mockLogger();
        Logger eventLogger = mockLogger();
        PageResources pr = mockPageResources(logger, eventLogger);

        train_getLogger(model, logger);
View Full Code Here


    public void attribute()
    {
        ComponentInstantiatorSource source = mockComponentInstantiatorSource();
        ComponentClassResolver resolver = mockComponentClassResolver();
        MarkupWriter writer = new MarkupWriterImpl(xmlModel);
        Location l = mockLocation();
        RenderQueue queue = mockRenderQueue();

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);
View Full Code Here

        ComponentClassResolver resolver = mockComponentClassResolver();
        TypeCoercer typeCoercer = mockTypeCoercer();
        BindingSource bindingSource = mockBindingSource();
        ComponentMessagesSource messagesSource = newMock(ComponentMessagesSource.class);
        ComponentResources resources = mockComponentResources();
        Location location = mockLocation();

        AttributeToken token = new AttributeToken(null, "fred", "${flintstone", location);

        replay();
View Full Code Here

    }

    @Test
    public void exception_properties()
    {
        Location l = mockLocation();

        replay();

        Throwable t = new TapestryException("Message", l, null);
View Full Code Here

    }

    @Test
    public void middle_exception_retained_due_to_extra_property()
    {
        Location l = mockLocation();

        replay();

        Throwable inner = new RuntimeException("Inner");
        Throwable middle = new TapestryException("Middle", l, inner);
View Full Code Here

    }

    @Test
    public void location_of_location()
    {
        Location l = mockLocation();

        replay();

        assertSame(l, InternalUtils.locationOf(l));
View Full Code Here

    }

    @Test
    public void location_of_locatable()
    {
        Location l = mockLocation();
        Locatable locatable = newMock(Locatable.class);

        expect(locatable.getLocation()).andReturn(l);

        replay();
View Full Code Here

     * @param classFactory used to obtain the {@link Location}
     * @return the method formatted for presentation to the user
     */
    public static String asString(Method method, ClassFactory classFactory)
    {
        Location location = classFactory.getMethodLocation(method);

        return location != null ? location.toString() : asString(method);
    }
View Full Code Here

            {
                // Expected
            }
            catch (Exception ex)
            {
                Location location = component == null ? null : component.getComponentResources().getLocation();

                throw new TapestryException(ex.getMessage(), location, ex);
            }
            finally
            {
View Full Code Here

        List<TemplateToken> tokens = tokens("componentWithParameters.tml");

        assertEquals(tokens.size(), 9);

        TemplateToken templateToken = get(tokens, 2);
        Location l = templateToken.getLocation();

        AttributeToken t1 = get(tokens, 3);

        // TODO: Not sure what order the attributes appear in. Order in the XML? Sorted
        // alphabetically? Random 'cause they're hashed?
View Full Code Here

TOP

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

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.