|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.anttestsetgen.sample.BroadBandValidator
Example of a TestSetValidator plug-in.
The BroadBandValidator is a plug-in for the TestSetGenerator that demonstrates how to develop your own validator. With this validator to parameters have to be set: name and city. Only when name contains the value '86 - 20th Ave.' and city contains the value 'Dallas' the validator will return true. In case on of the parameters is not set an BuildException will be thrown during validation.
| Field Summary | |
static java.lang.String |
VALID_CITY
The city that supports ADSL. |
static java.lang.String |
VALID_STREET
The street that supports ADSL. |
| Constructor Summary | |
BroadBandValidator()
|
|
| Method Summary | |
boolean |
isValid()
Validate the parameters. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Set a parameter of the validator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VALID_STREET
public static final java.lang.String VALID_CITY
| Constructor Detail |
public BroadBandValidator()
| Method Detail |
public void setParameter(java.lang.String name,
java.lang.String value)
setParameter in interface TestSetValidatorname - The name of the parametervalue - The value of the parameter
public boolean isValid()
throws org.apache.tools.ant.BuildException
isValid in interface TestSetValidatororg.apache.tools.ant.BuildException - In case one of the parameters is not set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||