Package org.apache.tapestry5

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


        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

        replay();

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

        assertEquals(link.toURI(), expectedURI);

        verify();
    }

    @Test
View Full Code Here

        Link link = new LinkImpl("/ctx/foo", false, LinkSecurity.INSECURE, response, encoder, null);

        assertSame(link.addParameterValue("bar", "plain"), link);

        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

        Link link = new LinkImpl("/ctx/foo", false, LinkSecurity.INSECURE, response, null, null);

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", null);

        assertEquals(link.toURI(), expectedURI);

        verify();
    }

    /**
 
View Full Code Here

        link.addParameter("barney", null);
        link.addParameter("barney", "foo");
        link.addParameter("barney", "bar");
        link.addParameter("barney", "baz");

        assertEquals(link.toURI(), expectedURI);

        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

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.