org.apache.anteater.test
Class FileRequest

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.anteater.test.BaseTask
                    |
                    +--org.apache.anteater.test.ActionTask
                          |
                          +--org.apache.anteater.test.FileRequest
All Implemented Interfaces:
Groupable

public class FileRequest
extends ActionTask

Defines a request to return the contents of a file The file is read into the body of an HttpMessage object. This allows standard matchers which compare the body with a file to essentialy be used to compare two files. The other fields (response, headers etc) in the HttpMessage are filled in with hard coded values modelled on the HttpRequest.java code.

Version:
$Revision: 1.1 $ $Date: 2003/04/12 08:07:36 $
Author:
Jim Gessling, Costin Manolache, Ovidiu Predescu, Jeff Turner

Field Summary
 
Fields inherited from class org.apache.anteater.test.ActionTask
haltonerror, logger, matcherSet, reqFeatures, result, session, successProp, successVal
 
Fields inherited from class org.apache.anteater.test.BaseTask
debug, debugWasSet
 
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
 
Constructor Summary
FileRequest()
           
 
Method Summary
protected  Object createMatchObject()
          make an HttpResponse from the contents of the file
 String getId()
          Return a String identification of this HTTP action suitable for reporting.
 String getURL()
          Return the URL associated with this task (that it implements or tests).
 void setPath(String h)
          Filename to look into
 
Methods inherited from class org.apache.anteater.test.ActionTask
addConfiguredLogger, addConfiguredSession, addConfiguredUses, addMatch, addNamespace, execute, getObjectModel, getProperties, getProperty, getPropertyAsInt, getResult, setAssign, setDebug, setHaltonerror, setValue
 
Methods inherited from class org.apache.anteater.test.BaseTask
debug, getDebug, getGroup, print, println, resolveContentURL, setGroup, setGroup
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRequest

public FileRequest()
Method Detail

setPath

public void setPath(String h)
Filename to look into


createMatchObject

protected Object createMatchObject()
                            throws Exception
make an HttpResponse from the contents of the file

Specified by:
createMatchObject in class ActionTask
Exception

getId

public String getId()
Description copied from class: ActionTask
Return a String identification of this HTTP action suitable for reporting. The string should identify this object within a list of others. It is used to identify this ActionTask in test reports.

Specified by:
getId in class ActionTask

getURL

public String getURL()
Description copied from class: ActionTask
Return the URL associated with this task (that it implements or tests).

Specified by:
getURL in class ActionTask


Ant Functional Tester -- see Project home page for details