| java.lang.Object com.uwyn.rife.test.MockForm
MockForm | public class MockForm (Code) | | Corresponds to a form in a HTML document after it has been parsed with
ParsedHtml.parse .
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ since: 1.1 |
Method Summary | |
public MockForm | file(String name, MockFileUpload file) Sets a file in this form. | public MockForm | files(String name, MockFileUpload[] files) Sets files in this request. | public String | getAction() Retrieves the content of this form's action attribute. | public String | getClassName() Retrieves the content of this form's class attribute. | public String | getId() Retrieves the content of this form's id attribute. | public String | getMethod() Retrieves the content of this form's method attribute. | public String | getName() Retrieves the content of this form's name attribute. | public Node | getNode() Retrieves the DOM XML node that this form corresponds to. | public Collection<String> | getParameterNames() Retrieves all the parameter names of this form. | public String | getParameterValue(String name) Retrieves the first value of a parameter in this form. | public String[] | getParameterValues(String name) Retrieves the values of a parameter in this form. | public Map<String, String[]> | getParameters() Retrieves all the parameters of this form. | public MockRequest | getRequest() Creates a new
MockRequest that contains the method, the
parameters and the files of this form. | public String | getTitle() Retrieves the content of this form's title attribute. | public boolean | hasParameter(String name) Checks whether a named parameter is present in this form. | public MockForm | parameter(String name, String value) Sets a parameter in this form. | public MockForm | parameter(String name, String[] values) Sets a parameter in this form. | public void | setFile(String name, MockFileUpload file) Sets a file in this form. | public void | setFiles(String name, MockFileUpload[] files) Sets files in this request. | public void | setParameter(String name, String value) Sets a parameter in this form. | public void | setParameter(String name, String[] values) Sets a parameter in this form. | public MockResponse | submit() Submit this form with its current parameters and files; and returns the
response. |
getAction | public String getAction()(Code) | | Retrieves the content of this form's action attribute.
the content of the action attribute; ornull if no such attribute could be found since: 1.0 |
getClassName | public String getClassName()(Code) | | Retrieves the content of this form's class attribute.
the content of the class attribute; ornull if no such attribute could be found since: 1.0 |
getId | public String getId()(Code) | | Retrieves the content of this form's id attribute.
the content of the id attribute; ornull if no such attribute could be found since: 1.0 |
getMethod | public String getMethod()(Code) | | Retrieves the content of this form's method attribute.
the content of the method attribute; ornull if no such attribute could be found since: 1.0 |
getName | public String getName()(Code) | | Retrieves the content of this form's name attribute.
the content of the name attribute; ornull if no such attribute could be found since: 1.0 |
getNode | public Node getNode()(Code) | | Retrieves the DOM XML node that this form corresponds to.
the corresponding DOM XML node since: 1.0 |
getRequest | public MockRequest getRequest()(Code) | | Creates a new
MockRequest that contains the method, the
parameters and the files of this form.
the created MockRequest since: 1.0 |
getTitle | public String getTitle()(Code) | | Retrieves the content of this form's title attribute.
the content of the title attribute; ornull if no such attribute could be found since: 1.0 |
submit | public MockResponse submit()(Code) | | Submit this form with its current parameters and files; and returns the
response.
the resulting MockResponse since: 1.0 |
|
|