Package org.apache.wicket.util.tester

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


      .getSecuritySettings()
      .setUnauthorizedComponentInstantiationListener(listener);

    try
    {
      tester.startPage(AdminPage.class);
      assertTrue("an authorization exception event should have been received",
        listener.eventReceived);
    }
    catch (Exception e)
    {
View Full Code Here


        mount.setMerged(false);
      }

    });

    tester.startPage(MergedContributorPage.class);
    tester.assertRenderedPage(MergedContributorPage.class);
    tester.assertResultPage(MergedContributorPage.class, "MergedContributorPage-expected.html");
  }
}
View Full Code Here

      @Override
      public String getConfigurationType() {
        return mode;
      }
    });
    tester.startPage(HomePage.class);
    tester.assertRenderedPage(HomePage.class);
    return tester;
  }

  private void assertDownloaded(WicketTester tester, String uri, ResourceReference... refs) throws IOException {
View Full Code Here

        return new RemoteHostResourceMount("http://cdn.example.com/test");
      }

    });

    tester.startPage(HomePage.class);
    tester.assertRenderedPage(HomePage.class);
    tester.assertResultPage(RemoteHostResourceMountTest.class, "RemoteHostResourceMountTest-expected.html");
  }
}
View Full Code Here

    };

    WicketTester tester = new WicketTester(application);
    try
    {
      tester.startPage(new CustomRequestPage());
    }
    finally
    {
      tester.destroy();
    }
View Full Code Here

  }

  public void testLabelWithMessage() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(LabelWithMessagePage.class);
    tester.assertContains("<label wicket:for=\"textfield\" for=\"textfield2\"><wicket:message key=\"foo\">my test text</wicket:message></label>");
  }

  public static class LabelWithNestedComponentsPage extends WebPage
  {
View Full Code Here

  }

  public void testLabelWithNestedComponent()
  {
    WicketTester tester = new WicketTester();
    tester.startPage(LabelWithNestedComponentsPage.class);
    tester.assertContains("<label wicket:for=\"textfield\" for=\"textfield2\"><input type=\"text\" wicket:id=\"textfield\" value=\"\" name=\"textfield\" id=\"textfield2\"/></label>");
  }
}
View Full Code Here

  }

  public void testLabelWithinEnclosure_Visible() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new LabelWithinEnclosurePage(true));
    tester.dumpPage();
    tester.assertContains("<label wicket:for=\"textfield\" for=\"textfield2\">blabla</label>");
  }

  public void testLabelWithinEnclosure_Invisible() throws Exception
View Full Code Here

  }

  public void testLabelWithinEnclosure_Invisible() throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(new LabelWithinEnclosurePage(false));
    tester.dumpPage();
    tester.assertContainsNot("label");
  }
}
View Full Code Here


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

  public void testLabelIsPrintedFromProperties() throws Exception
  {
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.