Package org.apache.wicket.util.tester

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


  }

  public void testLabelIsPrintedFromProperties() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new PrintLabelPage(Model.of((String)null)));
    tester.assertContains("<label wicket:for=\"input\" for=\"input2\">\\|label from properties\\|</label>");
  }

  public void testLabelIsPickedUpFromMarkup() throws Exception
  {
View Full Code Here


  }

  public void testLabelIsPickedUpFromMarkup() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new PickUpLabelPage(null));
    assertEquals(
      "label from markup",
      ((FormComponent)tester.getComponentFromLastRenderedPage("form:inputMarkupLabel")).getLabel()
        .getObject());
  }
View Full Code Here

  }

  public void testLabelIsPickedUpFromProperties() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new PickUpLabelPage(null));
    assertEquals(
      "label from properties",
      ((FormComponent)tester.getComponentFromLastRenderedPage("form:inputPropertiesLabel")).getLabel()
        .getObject());
  }
View Full Code Here

  }

  public void testWithoutAutolabel() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new PickUpLabelPage(null));
    tester.assertContains("<label>label from markup without autolabel</label>");
    assertEquals(
      "label from markup without autolabel",
      ((FormComponent)tester.getComponentFromLastRenderedPage("form:inputWithoutAutolabel")).getLabel()
        .getObject());
View Full Code Here

        ajaxLazyLoadPanel = ajaxLazyLoadPanel1;
        return (Panel)ajaxLazyLoadPanel;
      }

    });
    wt.startPage(dummyPanelPage);
    wt.assertLabel(
      "panel:content",
      "<img alt=\"Loading...\" src=\"resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif\"/>");
    AjaxLazyLoadPanelTester.executeAjaxLazyLoadPanel(wt, dummyPanelPage);
    wt.debugComponentTrees();
View Full Code Here

   * Test that the header contribution is added correctly.
   */
  public void testRenderHead()
  {
    WicketTester tester = new WicketTester();
    tester.startPage(VelocityJavascriptPage.class);
    tester.assertContains("msg1: " + VelocityJavascriptPage.MSG1);
    tester.dumpPage();
  }
}
View Full Code Here

  /**
   * Basic test
   */
  public void testVelocityPanel() {
    WicketTester tester = new WicketTester();
    tester.startPage(VelocityPage.class);
    tester.assertContains(VelocityPage.TEST_STRING);
    tester.dumpPage();
  }

  /**
 
View Full Code Here

  /**
   * Test with Wicket markup parsing
   */
  public void testVelocityPanelWithMarkupParsing() {
    WicketTester tester = new WicketTester();
    tester.startPage(VelocityWithMarkupParsingPage.class);
    tester.assertLabel("velocityPanel:message", VelocityPage.TEST_STRING);
    tester.dumpPage();
  }
}
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

   */
  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

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.