org.apache.anteater.test.matchers
Class Parameter
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.anteater.test.BaseTask
|
+--org.apache.anteater.test.ContentHandlerTask
|
+--org.apache.anteater.test.MatcherTest
|
+--org.apache.anteater.test.matchers.Parameter
- All Implemented Interfaces:
- Groupable, ObjectModel, org.apache.tools.ant.TaskContainer
- public class Parameter
- extends MatcherTest
Maintains and checks a single HTTP parameter.
- Version:
- $Revision: 1.12 $ $Date: 2003/01/18 04:09:47 $
- Author:
- Ovidiu Predescu, Costin Manolache
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
name
protected String name
value
protected String value
type
protected String type
Parameter
public Parameter()
Parameter
public Parameter(String name,
String value,
String type)
create
public static Parameter create(org.apache.tools.ant.Project proj,
String name,
String value)
- A factory for creating HTTP GET Parameters which have their 'project'
field properly set.
setName
public void setName(String name)
getName
public String getName()
setValue
public void setValue(String value)
addText
public void addText(String body)
- Description copied from class:
MatcherTest
- Sets the body text.
- Overrides:
addText
in class MatcherTest
getValue
public String getValue()
- Get expected value. Can be set either from the 'value' attribute, or a nested element.
setType
public void setType(String type)
- POST or GET - if not set the current method's type will be
used. You can set it to force GET parameters on POST requests
getType
public String getType()
equals
public boolean equals(Object another)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
validate
public boolean validate()
throws org.apache.tools.ant.BuildException
- Description copied from class:
MatcherTest
- Return true if this instance matches against the
matchOn
object of the matcher
.
- Specified by:
validate
in class MatcherTest
- Returns:
- a
boolean
value
org.apache.tools.ant.BuildException
Ant Functional Tester -- see Project home page for details