Examples of renderPage()


Examples of org.apache.tapestry5.test.PageTester.renderPage()

        SecurityContextHolder.getContext().setAuthentication(new TestingAuthenticationToken("user1","user1","ROLE_LOGGEDIN"));
       
        EasyMock.reset(MockFactory.getInstance().getMockedObjects());
        EasyMock.replay(MockFactory.getInstance().getMockedObjects());
       
        assertTrue(tester.renderPage("securedmethod").toString().contains("Welcome back user !"));
        EasyMock.verify(MockFactory.getInstance().getMockedObjects());
       
        assertEquals(200,resp.getStatus()); //err not allowed!
       
  }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester.renderPage()

        PageTester tester = new PageTester(appPackage, appName, "src/test/resources/webapp");
       
        EasyMock.expect(MockFactory.getInstance().getMockedServletRequest().getUserPrincipal()).andReturn(null).times(2);
       
        EasyMock.replay(MockFactory.getInstance().getMockedObjects());
        Document dom = tester.renderPage("LoggedIn");
        EasyMock.verify(MockFactory.getInstance().getMockedObjects());
       
        assertTrue(dom.toString().contains("Welcome back anonymous"));
       
        EasyMock.reset(MockFactory.getInstance().getMockedObjects());
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester.renderPage()

      public String getName() {
        return "User1";
      }}).times(2);
       
        EasyMock.replay(MockFactory.getInstance().getMockedObjects());
        dom = tester.renderPage("LoggedIn");
        EasyMock.verify(MockFactory.getInstance().getMockedObjects());
        EasyMock.reset(MockFactory.getInstance().getMockedObjects());
         assertTrue(dom.toString().contains("Welcome back user"));
       
  }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester.renderPage()

    /** TAP5-901 */
    @Test
    public void override_abstract_methods() {
      PageTester tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
      try {
          Document doc = tester.renderPage("OverrideAbstractMethods");
          assertEquals("6", doc.getElementById("length").getChildMarkup());
      } finally {
        tester.shutdown();
      }
    }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester.renderPage()

    @Test(dataProvider = "dtd_page_provider")
    public void verify_correct_dtds(String pageName, String expectedDTD, String checkText)
    {
        PageTester tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage(pageName);
        String txt = doc.toString();
        // use startsWith to make sure the DTD is getting into the right spot.
        assertTrue(txt.startsWith(expectedDTD));
        // we should also make sure that the other DTD's don't appear anywhere else...
        checkOtherDTD(txt, expectedDTD);
View Full Code Here

Examples of org.apache.wicket.Page.renderPage()

      requestCycle.redirectTo(page);
    }
    else
    {
      // else render the page directly
      page.renderPage();
    }
  }

  /**
   * @return The component path.
View Full Code Here

Examples of org.apache.wicket.Page.renderPage()

      requestCycle.redirectTo(page);
    }
    else
    {
      // else render the page directly
      page.renderPage();
    }
  }

  /**
   * @return The component path.
View Full Code Here

Examples of org.apache.wicket.Page.renderPage()

      requestCycle.redirectTo(page);
    }
    else
    {
      // else render the page directly
      page.renderPage();
    }
  }

  /**
   * @return The component path.
View Full Code Here

Examples of org.apache.wicket.Page.renderPage()

      requestCycle.redirectTo(page);
    }
    else
    {
      // Let page render itself
      page.renderPage();
    }
  }

  /** {@inheritDoc} */
  public void detach(RequestCycle requestCycle)
View Full Code Here

Examples of org.apache.wicket.Page.renderPage()

      requestCycle.redirectTo(page);
    }
    else
    {
      // Let page render itself
      page.renderPage();
    }
  }

  /** {@inheritDoc} */
  public void detach(RequestCycle requestCycle)
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.