Package org.apache.wicket.util.tester

Examples of org.apache.wicket.util.tester.WicketTester.startPage()


  }

  public void testPageInitialization()
  {
    WicketTester tester = new WicketTester();
    tester.startPage(TestPage.class);
    TestPage page = (TestPage)tester.getLastRenderedPage();

    assertEquals(1, page.getCount());
  }
View Full Code Here


      {
        return DummyHomePage.class;
      }
    });

    tester.startPage(DummyHomePage.class);
    Session.get().invalidateNow();
  }
}
View Full Code Here

        };
      }

    };

    wicketTester.startPage(TransparentWithAjaxUpdatePage.class);
    wicketTester.clickLink("link", true);
    wicketTester.destroy();
  }

  /** */
 
View Full Code Here

        return new CustomServletWebRequest(servletRequest, filterPath);
      }
    };

    WicketTester tester = new WicketTester(application);
    tester.startPage(new CustomRequestPage());
  }

  private static class CustomRequestPage extends WebPage implements IMarkupResourceStreamProvider
  {
    private static final long serialVersionUID = 1L;
View Full Code Here

   * @throws Exception
   */
  public void testPagedTable() throws Exception
  {
    WicketTester application = new WicketTester();
    application.startPage(PagedTablePage.class);
    PagedTablePage page = (PagedTablePage)application.getLastRenderedPage();
    String document = application.getServletResponse().getDocument();
    assertTrue(validatePage1(document));

    Link link = (Link)page.get("navigation:1:pageLink");
View Full Code Here

   */
  public void testEncodeStringArray()
  {
    WebRequestCodingStrategy wrcs = new WebRequestCodingStrategy();
    WicketTester app = new WicketTester();
    app.startPage(MockPage.class);
    PageParameters params = new PageParameters();
    params.add("a", "1");
    params.add("a", "2");
    BookmarkablePageRequestTarget requestTarget = new BookmarkablePageRequestTarget(
        MockPage.class, params);
View Full Code Here

   * @throws Exception
   */
  public void testPagedTable() throws Exception
  {
    WicketTester application = new WicketTester();
    application.startPage(PagedTableNavigatorWithLabelProviderPage.class);
    PagedTableNavigatorWithLabelProviderPage page = (PagedTableNavigatorWithLabelProviderPage)application
        .getLastRenderedPage();
    String document = application.getServletResponse().getDocument();
    DiffUtil.validatePage(document, this.getClass(),
        "PagedTableNavigatorWithLabelProviderExpectedResult_1.html", true);
View Full Code Here

   * @throws Exception
   */
  public void testResponsePageClass() throws Exception
  {
    WicketTester mockWebApp = new WicketTester();
    mockWebApp.startPage(SimpleResponsePageClass.class);
    SimpleResponsePageClass manageBook = (SimpleResponsePageClass)mockWebApp
        .getLastRenderedPage();

    Form form = (Form)manageBook.get("form");
    mockWebApp.setupRequestAndResponse();
View Full Code Here

   * @throws Exception
   */
  public void testPagedTable() throws Exception
  {
    WicketTester application = new WicketTester();
    application.startPage(PagedTableNavigatorWithMarginPage.class);
    PagedTableNavigatorWithMarginPage page = (PagedTableNavigatorWithMarginPage)application
        .getLastRenderedPage();
    String document = application.getServletResponse().getDocument();
    DiffUtil.validatePage(document, this.getClass(),
        "PagedTableNavigatorWithMarginExpectedResult_1.html", true);
View Full Code Here

   * @throws Exception
   */
  public void testPagedTable() throws Exception
  {
    WicketTester application = new WicketTester();
    application.startPage(PagedTableNavigatorPage.class);
    PagedTableNavigatorPage page = (PagedTableNavigatorPage)application.getLastRenderedPage();
    String document = application.getServletResponse().getDocument();
    application.setupRequestAndResponse();
    DiffUtil.validatePage(document, this.getClass(),
        "PagedTableNavigatorExpectedResult_1.html", true);
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.