public class ExtendedWicketTester
extends org.apache.wicket.util.tester.WicketTester
BaseWicketTester.startComponentInPage(Component) and variants.| Modifier and Type | Class and Description |
|---|---|
static class |
ExtendedWicketTester.StartComponentInForm
A page that is used as the automatically created page for
startComponentInForm(Class, String) and the other variations. |
| Constructor and Description |
|---|
ExtendedWicketTester()
Creates an
ExtendedWicketTester and automatically creates a WebApplication,
but the tester will have no home page. |
ExtendedWicketTester(Class<? extends org.apache.wicket.Page> homePage)
Creates an
ExtendedWicketTester and automatically creates a WebApplication. |
ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application)
Creates an
ExtendedWicketTester. |
ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application,
javax.servlet.ServletContext servletCtx)
Creates an
ExtendedWicketTester to help unit testing. |
ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application,
String path)
Creates an
ExtendedWicketTester to help unit testing. |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.wicket.Page |
createFormPage()
Creates a
Page to test a component with
startComponentInForm(Component, String, IMarkupFragment) |
protected String |
createFormPageMarkup(String componentId,
String inputType)
Creates the markup that will be used for the automatically created
Page that will be
used to test a component with BaseWicketTester.startComponentInPage(Class, IMarkupFragment) |
<C extends org.apache.wicket.Component> |
startComponentInForm(Class<C> componentClass,
String inputType)
Process a component.
|
<C extends org.apache.wicket.Component> |
startComponentInForm(Class<C> componentClass,
String inputType,
org.apache.wicket.markup.IMarkupFragment pageMarkup)
Process a component.
|
<C extends org.apache.wicket.Component> |
startComponentInForm(C component,
String inputType)
Process a component.
|
<C extends org.apache.wicket.Component> |
startComponentInForm(C component,
String inputType,
org.apache.wicket.markup.IMarkupFragment pageMarkup)
Process a component.
|
assertAjaxLocation, assertBehavior, assertBookmarkablePageLink, assertComponent, assertComponentFeedbackMessage, assertComponentOnAjaxResponse, assertComponentOnAjaxResponse, assertContains, assertContainsNot, assertDisabled, assertEnabled, assertErrorMessages, assertFeedback, assertFeedbackMessages, assertInfoMessages, assertInvisible, assertLabel, assertListView, assertMarkupLocale, assertMarkupStyle, assertMarkupVariation, assertModelValue, assertNoErrorMessage, assertNoFeedbackMessage, assertNoInfoMessage, assertNotRequired, assertRedirectUrl, assertRenderedPage, assertRequired, assertResultPage, assertResultPage, assertUsability, assertVisible, clickLink, executeBehavior, executeListener, executeTest, executeTest, executeTest, executeTest, getBasediraddRequestHeader, applyRequest, assertExists, assertNotExists, checkUsability, cleanupFeedbackMessages, cleanupFeedbackMessages, clearFeedbackMessages, clickLink, clickLink, createOriginHeader, createPage, createPageMarkup, debugComponentTrees, debugComponentTrees, destroy, dumpPage, executeAjaxEvent, executeAjaxEvent, executeAjaxUrl, executeAllTimerBehaviors, executeBehavior, executeListener, executeUrl, getApplication, getComponentFromLastRenderedPage, getComponentFromLastRenderedPage, getComponentFromLastRenderedPage, getContentDispositionFromResponseHeader, getContentLengthFromResponseHeader, getContentTypeFromResponseHeader, getFeedbackMessages, getHttpSession, getLastModifiedFromResponseHeader, getLastRenderedPage, getLastRequest, getLastResponse, getLastResponseAsString, getMessages, getPreviousRequests, getPreviousResponses, getRequest, getRequestCycle, getResourcePollFrequency, getResponse, getServletContext, getSession, getTagById, getTagByWicketId, getTagsByWicketId, getWicketAjaxBaseUrlEncodedInLastResponse, hasLabel, hasNoErrorMessage, hasNoFeedbackMessage, hasNoInfoMessage, ifContains, ifContainsNot, invokeListener, invokeListener, isComponent, isComponentOnAjaxResponse, isDisabled, isEnabled, isEqual, isExposeExceptions, isFollowRedirects, isInvisible, isNotRequired, isNotRequired, isRenderedPage, isRequired, isRequired, isResultPage, isUseRequestUrlAsBase, isVisible, newFormTester, newFormTester, newServletWebResponse, newTestPageManagerProvider, processRequest, processRequest, processRequest, processRequest, processRequest, servletRequestLocale, setExposeExceptions, setFollowRedirects, setLastResponse, setRequest, setUseRequestUrlAsBase, startComponentInPage, startComponentInPage, startComponentInPage, startComponentInPage, startPage, startPage, startPage, startPage, startResource, startResourceReference, startResourceReference, submitForm, submitForm, urlFor, urlFor, urlForpublic ExtendedWicketTester()
ExtendedWicketTester and automatically creates a WebApplication,
but the tester will have no home page.public ExtendedWicketTester(Class<? extends org.apache.wicket.Page> homePage)
ExtendedWicketTester and automatically creates a WebApplication.homePage - a home page Classpublic ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application)
ExtendedWicketTester.application - a WicketTester WebApplication objectpublic ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application,
String path)
ExtendedWicketTester to help unit testing.application - a WicketTester WebApplication objectpath - the absolute path on disk to the web application's contents (e.g. war root) - may
be nullorg.apache.wicket.mock.MockApplication#MockApplication()public ExtendedWicketTester(org.apache.wicket.protocol.http.WebApplication application,
javax.servlet.ServletContext servletCtx)
ExtendedWicketTester to help unit testing.application - a WicketTester WebApplication objectservletCtx - the servlet context used as backendpublic final <C extends org.apache.wicket.Component> C startComponentInForm(Class<C> componentClass, String inputType)
BaseWicketTester.createPageMarkup(String).
Note: the instantiated component will have an auto-generated id. To
reach any of its children use their relative path to the component itself. For example
if the started component has a child a Link component with id "link" then after starting
the component you can click it with: tester.clickLink("link")
C - the type of the componentcomponentClass - the class of the component to be testedinputType - the type of HTML input to be associated with the component to be testedBaseWicketTester.startComponentInPage(org.apache.wicket.Component)public final <C extends org.apache.wicket.Component> C startComponentInForm(Class<C> componentClass, String inputType, org.apache.wicket.markup.IMarkupFragment pageMarkup)
pageMarkup
provided. In case pageMarkup is null, the markup will be automatically created with
createFormPageMarkup(String, String).
Note: the instantiated component will have an auto-generated id. To
reach any of its children use their relative path to the component itself. For example
if the started component has a child a Link component with id "link" then after starting
the component you can click it with: tester.clickLink("link")
C - the type of the componentcomponentClass - the class of the component to be testedinputType - the type of HTML input to be associated with the component to be testedpageMarkup - the markup for the Page that will be automatically created. May be null.public final <C extends org.apache.wicket.Component> C startComponentInForm(C component,
String inputType)
createFormPageMarkup(String, String).
Note: the component id is set by the user. To
reach any of its children use this id + their relative path to the component itself. For example
if the started component has id compId and a Link child component component with id "link"
then after starting the component you can click it with: tester.clickLink("compId:link")
C - the type of the componentcomponent - the component to be testedinputType - the type of HTML input to be associated with the component to be testedBaseWicketTester.startComponentInPage(Class)public final <C extends org.apache.wicket.Component> C startComponentInForm(C component,
String inputType,
org.apache.wicket.markup.IMarkupFragment pageMarkup)
pageMarkup
provided. In case pageMarkup is null, the markup will be automatically created with
createFormPageMarkup(String, String).
Note: the component id is set by the user. To
reach any of its children use this id + their relative path to the component itself. For example
if the started component has id compId and a Link child component component with id "link"
then after starting the component you can click it with: tester.clickLink("compId:link")
C - the type of the componentcomponent - the component to be testedinputType - the type of HTML input to be associated with the component to be testedpageMarkup - the markup for the Page that will be automatically created. May be null.protected String createFormPageMarkup(String componentId, String inputType)
Page that will be
used to test a component with BaseWicketTester.startComponentInPage(Class, IMarkupFragment)componentId - the id of the component to be testedinputType - the form input type ('text', 'checkbox', 'password', etc)Page as String. Cannot be null.protected org.apache.wicket.Page createFormPage()
Page to test a component with
startComponentInForm(Component, String, IMarkupFragment)Page which will contain a form as a single child with the component under
test as a single inputCopyright © 2014–2019 Premium Minds. All rights reserved.