java.lang.Object
org.apache.wicket.util.tester.WicketTesterHelper
A
WicketTester
-specific helper class.- Since:
- 1.2.6
- Author:
- Ingram Chen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ComponentData
class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asLined
(Collection<?> objects) AtoString
method for the givenCollection
.static void
assertEquals
(Collection<?> expects, Collection<?> actuals) Asserts that bothCollection
s contain the same elements.static void
failWithVerboseMessage
(Collection<?> expects, Collection<?> actuals) Fails with a verbose error message.static AjaxEventBehavior
findAjaxEventBehavior
(Component component, String event) Finds the first AjaxEventBehavior attached to the specified component with the specified event.static List<AjaxEventBehavior>
findAjaxEventBehaviors
(Component component, String event) Finds all AjaxEventBehavior's attached to the specified component with the specified event.static Behavior
findBehavior
(Component component, Class<? extends Behavior> behaviorClass) static List<WicketTesterHelper.ComponentData>
getComponentData
(Page page) Gets recursively allComponent
s of a givenPage
, extracts the information relevant to us, and adds them to aList
.
-
Constructor Details
-
WicketTesterHelper
public WicketTesterHelper()
-
-
Method Details
-
getComponentData
Gets recursively allComponent
s of a givenPage
, extracts the information relevant to us, and adds them to aList
.- Parameters:
page
- thePage
to analyze- Returns:
- a
List
ofComponent
data objects
-
assertEquals
Asserts that bothCollection
s contain the same elements.- Parameters:
expects
- aCollection
objectactuals
- aCollection
object
-
failWithVerboseMessage
Fails with a verbose error message.- Parameters:
expects
- aCollection
objectactuals
- aCollection
object
-
asLined
AtoString
method for the givenCollection
.- Parameters:
objects
- aCollection
object- Returns:
- a
String
representation of theCollection
-
findAjaxEventBehavior
Finds the first AjaxEventBehavior attached to the specified component with the specified event.- Parameters:
component
-event
-- Returns:
- the first behavior for this event, or
null
-
findAjaxEventBehaviors
Finds all AjaxEventBehavior's attached to the specified component with the specified event.- Parameters:
component
-event
-- Returns:
- a list of all found AjaxEventBehavior or an empty list
-
findBehavior
- Parameters:
component
-behaviorClass
-- Returns:
- Behavior or null
-