Examples of PageTesterComponentInvocationMap


Examples of org.apache.tapestry.internal.test.PageTesterComponentInvocationMap

    @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

Examples of org.apache.tapestry.internal.test.PageTesterComponentInvocationMap

    @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

Examples of org.apache.tapestry5.internal.test.PageTesterComponentInvocationMap

    @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, link);

        verify();

        Element e = writer.getElement();

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

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

Examples of org.apache.tapestry5.internal.test.PageTesterComponentInvocationMap

    @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, link);

        verify();

        Element e = writer.getElement();

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

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

Examples of org.apache.tapestry5.internal.test.PageTesterComponentInvocationMap

    @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, link);

        verify();

        Element e = writer.getElement();

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

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

Examples of org.apache.tapestry5.internal.test.PageTesterComponentInvocationMap

    @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, link);

        verify();

        Element e = writer.getElement();

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

        assertEquals(writer.toString(), "<a href=\"/foo/bar.baz#wilma\">link text</a>");
        assertSame(map.get(e), invocation);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.