Package org.apache.tapestry5

Examples of org.apache.tapestry5.Link.toURI()


        Link link = new LinkImpl("/foo/bar", true, false, response, optimizer);
        link.setAnchor("wilma");

        assertSame(link.getAnchor(), "wilma");

        assertEquals(link.toURI(), ENCODED + "#" + "wilma");

        verify();
    }

    @Test
View Full Code Here


        replay();

        Link link = new LinkImpl("/ctx/foo?foo=bar", false, false, response, optimizer);
        link.addParameter("baz", "barney");

        assertEquals(link.toURI(), expectedURI);

        verify();
    }

    @Test
View Full Code Here

        link.addParameter("baz", "barney");
        link.setAnchor("jacob");

        Link copy = link.copyWithBasePath("/ctx/baz");

        assertEquals(copy.toURI(), expectedURI + "#jacob");

        verify();
    }

    @Test
View Full Code Here

                                                  contextValueEncoder, securityManager);
        factory.addListener(listener);

        Link link = factory.createActionLink(page, null, "myaction", false, "1.2.3", "4.5.6");

        assertEquals(link.toURI(), ENCODED);
        assertSame(link, holder.get());

        verify();
    }
View Full Code Here

                                                  contextValueEncoder, securityManager);
        factory.addListener(listener);

        Link link = factory.createActionLink(containingPage, null, "myaction", false);

        assertEquals(link.toURI(), ENCODED);
        assertSame(link, holder.get());

        verify();
    }
View Full Code Here

                                                  contextValueEncoder, securityManager);
        factory.addListener(listener);

        Link link = factory.createActionLink(page, nestedId, eventName, false, context);

        assertEquals(link.toURI(), ENCODED);
        assertSame(link, holder.get());

        verify();
    }
View Full Code Here

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("MyPage", new EmptyEventContext());

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toURI(), "MAGIC");

        verify();
    }

    @Test
View Full Code Here

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("admin/Index", new ArrayEventContext(
                typeCoercer, "abc"));

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toURI(), "MAGIC");

        verify();
    }

    @Test
View Full Code Here

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("Index", new EmptyEventContext());

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toURI(), "MAGIC");

        verify();
    }

    @Test
View Full Code Here

        Link link = new LinkImpl(url, false, LinkSecurity.INSECURE, response, null, null);
        link.setAnchor("wilma");

        assertSame(link.getAnchor(), "wilma");

        assertEquals(link.toURI(), ENCODED + "#" + "wilma");

        verify();
    }

    @Test
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.