org.apache.wicket.util.tester
Class WicketTesterHelper

java.lang.Object
  extended by org.apache.wicket.util.tester.WicketTesterHelper

public class WicketTesterHelper
extends Object

A WicketTester-specific helper class.

Since:
1.2.6
Author:
Ingram Chen

Nested Class Summary
static class WicketTesterHelper.ComponentData
          ComponentData class.
 
Constructor Summary
WicketTesterHelper()
           
 
Method Summary
static String asLined(Collection<?> objects)
          A toString method for the given Collection.
static void assertEquals(Collection<?> expects, Collection<?> actuals)
          Asserts that both Collections contain the same elements.
static void failWithVerboseMessage(Collection<?> expects, Collection<?> actuals)
          Fails with a verbose error message.
static List<WicketTesterHelper.ComponentData> getComponentData(Page page)
          Gets recursively all Components of a given Page, extracts the information relevant to us, and adds them to a List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WicketTesterHelper

public WicketTesterHelper()
Method Detail

getComponentData

public static List<WicketTesterHelper.ComponentData> getComponentData(Page page)
Gets recursively all Components of a given Page, extracts the information relevant to us, and adds them to a List.

Parameters:
page - the Page to analyze
Returns:
a List of Component data objects

assertEquals

public static void assertEquals(Collection<?> expects,
                                Collection<?> actuals)
Asserts that both Collections contain the same elements.

Parameters:
expects - a Collection object
actuals - a Collection object

failWithVerboseMessage

public static void failWithVerboseMessage(Collection<?> expects,
                                          Collection<?> actuals)
Fails with a verbose error message.

Parameters:
expects - a Collection object
actuals - a Collection object

asLined

public static String asLined(Collection<?> objects)
A toString method for the given Collection.

Parameters:
objects - a Collection object
Returns:
a String representation of the Collection


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.