|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.apache.commons.latka.validators.BaseValidator
org.apache.commons.latka.validators.ResponseHeaderValidator
ResponseHeaderValidator validates response headers in an HTTP session.
| Constructor Summary | |
ResponseHeaderValidator(java.lang.String headerName)
Constructs a validator for the given header with no label. |
|
ResponseHeaderValidator(java.lang.String label,
java.lang.String headerName)
Constructs a labeled validator for the given header |
|
| Method Summary | |
void |
setHeaderValue(java.lang.String headerValue)
Sets the desired value of the header to be validated. |
void |
validate(Response response)
Checks to see that the header exists, and also checks its value if setHeaderValue(String) has been called |
| Methods inherited from class org.apache.commons.latka.validators.BaseValidator |
getLabel, setLabel |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ResponseHeaderValidator(java.lang.String headerName)
headerName - Name of the header to validate
public ResponseHeaderValidator(java.lang.String label,
java.lang.String headerName)
label - name of the header to validateheaderName - | Method Detail |
public void setHeaderValue(java.lang.String headerValue)
headerValue - desired value of the header, or null to look for a
header with the String value "null"
public void validate(Response response)
throws ValidationException
validate in interface Validatorvalidate in class BaseValidatorresponse - The HTTP response to validate
ValidationException - if the header does not meet the criteria of the test
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||