| java.lang.Object org.apache.cocoon.forms.formmodel.WidgetTestHelper
WidgetTestHelper | public class WidgetTestHelper (Code) | | Helper class to build Widget test cases.
version: $Id: WidgetTestHelper.java 449149 2006-09-23 03:58:05Z crossley $ |
Method Summary | |
public static void | assertXPathEquals(String expected, String xpath, Document doc) | public static void | assertXPathEquals(String message, String expected, String xpath, Document doc) | public static void | assertXPathExists(String xpath, Document doc) | public static void | assertXPathExists(String message, String xpath, Document doc) | public static void | assertXPathNotExists(String xpath, Document doc) | public static void | assertXPathNotExists(String message, String xpath, Document doc) | public static Document | getWidgetFragment(Widget widget, Locale locale) Get the result of a widget's generateSaxFragment() method as a Document. | public static Form | loadForm(ServiceManager manager, Object obj, String resource) Load a Form whose definition relative to a given object (typically, the TestCase class). |
getWidgetFragment | public static Document getWidgetFragment(Widget widget, Locale locale) throws SAXException(Code) | | Get the result of a widget's generateSaxFragment() method as a Document.
The widget's fragment is encapsulated in a root <fi:fragment> element,
since there's no guarantee that a widget outputs a single top-level element
(there can be several elements, or even none if the widget is invisible)
Parameters: widget - the widget of which we want the fragment Parameters: locale - the locale to be used to generate the fragment the document containing the fragment |
loadForm | public static Form loadForm(ServiceManager manager, Object obj, String resource) throws Exception(Code) | | Load a Form whose definition relative to a given object (typically, the TestCase class).
Parameters: manager - the ServiceManager that will be used to create the form Parameters: obj - the object relative to which the resource will be read Parameters: resource - the relative resource name for the form definition the Form throws: Exception - |
|
|