Package org.apache.tapestry.internal.services

Examples of org.apache.tapestry.internal.services.ComponentInvocationMap


    @Test
    public void no_anchor()
    {
        Link link = mockLink();
        ComponentResources resources = mockComponentResources();
        ComponentInvocationMap map = new PageTesterComponentInvocationMap();
        MarkupWriter writer = new MarkupWriterImpl();
        ComponentInvocation invocation = mockComponentInvocation();

        map.store(link, invocation);

        train_toURI(link, LINK_URI);

        resources.renderInformalParameters(writer);

        replay();

        _linkFixture.inject(null, map, resources);

        _linkFixture.writeLink(writer, "fred", link);

        verify();

        Element e = writer.getElement();

        writer.write("link text");
        writer.end();

        assertEquals(writer.toString(), "<a href=\"/foo/bar.baz\" id=\"fred\">link text</a>");
        assertSame(map.get(e), invocation);
    }
View Full Code Here


    @Test
    public void with_anchor()
    {
        Link link = mockLink();
        ComponentResources resources = mockComponentResources();
        ComponentInvocationMap map = new PageTesterComponentInvocationMap();
        MarkupWriter writer = new MarkupWriterImpl();
        ComponentInvocation invocation = mockComponentInvocation();

        map.store(link, invocation);

        train_toURI(link, LINK_URI);

        resources.renderInformalParameters(writer);

        replay();

        _linkFixture.inject("wilma", map, resources);

        _linkFixture.writeLink(writer, "barney", link);

        verify();

        Element e = writer.getElement();

        writer.write("link text");
        writer.end();

        assertEquals(writer.toString(), "<a href=\"/foo/bar.baz#wilma\" id=\"barney\">link text</a>");
        assertSame(map.get(e), invocation);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.internal.services.ComponentInvocationMap

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.