Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.LinkFactory


    }


    public void test_Resource_Link_Paths()
    {
        LinkFactory factory = newMock(LinkFactory.class);
        ILink link = newMock(ILink.class);
       
        AssetService service = new AssetService();
       
        ResourceMatcherImpl rm = new ResourceMatcherImpl();
        List patterns = new ArrayList();
        patterns.add("tapestry/*");
        patterns.add("dojo/*");
        rm.setContributions(patterns);
        rm.initializeService();
       
        service.setUnprotectedMatcher(rm);
        service.setLinkFactory(factory);
       
        expect(factory.constructLink(eq(service), eq(false), isA(Map.class), eq(false))).andReturn(link);
       
        replay();
       
        service.getLink(false, "dojo/src/html.js");
       
View Full Code Here


        Map parameters = new HashMap();

        replay();

        LinkFactory lf = new LinkFactoryImpl();

        try
        {
            lf.constructLink(service, false, parameters, true);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(ImplMessages.serviceNameIsNull(), ex.getMessage());
View Full Code Here

public class ExternalServiceTest extends ServiceTestCase
{
    public void test_Get_Link()
    {
        Object[] serviceParameters = new Object[0];
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.PAGE, "ActivePage");
        parameters.put(ServiceConstants.PARAMETER, serviceParameters);
View Full Code Here

    public void test_Service() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IExternalPage page = newMock(IExternalPage.class);
        Object[] parameters = new Object[0];
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();
       
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
       
        trainGetPage(cycle, "ActivePage", page);
View Full Code Here

@Test
public class PageServiceTest extends ServiceTestCase
{
    public void testGetLink()
    {
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.PAGE, "TargetPage");
View Full Code Here

{
    public void testGetLink()
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        ResetService s = new ResetService();
        s.setLinkFactory(lf);
        s.setRequestCycle(cycle);
View Full Code Here

        Map parameters = new HashMap();

        replayControls();

        LinkFactory lf = new LinkFactoryImpl();

        try
        {
            lf.constructLink(service, false, parameters, true);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(ImplMessages.serviceNameIsNull(), ex.getMessage());
View Full Code Here

    {
        IPage page = newPage("ThePage");
        IDirect c = newDirect(true);
        IRequestCycle cycle = newCycle();
        WebRequest request = newWebRequest(false, null);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        trainGetPage(cycle, page);
        trainGetPage(c, page);
        trainGetIdPath(c, "fred.barney");
View Full Code Here

    {
        IPage page = newPage("ThePage");
        IDirect c = newDirect(true);
        IRequestCycle cycle = newCycle();
        WebRequest request = newWebRequest(false, null);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();

        trainGetPage(cycle, page);
        trainGetPage(c, page);
        trainGetIdPath(c, "fred.barney");
View Full Code Here

       
        IPage page = newPage("ThePage");
        IRequestCycle cycle = newCycle();
        WebSession session = newWebSession();
        WebRequest request = newWebRequest(false, session);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();
       
        trainGetPage(cycle, page);
        trainGetPage(c, page);
        trainGetIdPath(c, "fred.barney");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.LinkFactory

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.