org.apache.tomcat.util.test
Class Matcher

java.lang.Object
  extended byorg.apache.tomcat.util.test.Matcher
Direct Known Subclasses:
GoldenMatch, HeaderMatch, HttpStatusMatch, ResponseMatch, ResponseMatchFile, SessionMatch

public class Matcher
extends java.lang.Object

Part of the GTest application


Field Summary
protected  HttpClient client
           
protected  int debug
           
protected  boolean magnitude
           
protected  HttpRequest request
           
protected  HttpResponse response
           
protected  boolean result
           
 
Constructor Summary
Matcher()
           
 
Method Summary
 void execute()
          Execute the test
 HttpClient getHttpClient()
           
 HttpRequest getHttpRequest()
           
 HttpResponse getHttpResponse()
           
 java.lang.String getMessage()
          Return a message describing the reason of the failure or the test log
 boolean getResult()
          Result of the test
 java.lang.String getTestDescription()
          Test description ( text representation of the test )
protected  void log(java.lang.String s)
          Add a message to the test log
 void setDebug(int d)
          Display debug info
 void setExpectedResult(boolean b)
           
 void setHttpClient(HttpClient req)
          The test case
 void setHttpRequest(HttpRequest req)
          The request that generated the response
 void setHttpResponse(HttpResponse resp)
          The response we'll match against
 void setIf(java.lang.String prop)
           
 void setMagnitude(boolean b)
           
 void setUnless(java.lang.String prop)
           
 boolean skipTest()
          Check if test should be skipped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

response

protected HttpResponse response

request

protected HttpRequest request

client

protected HttpClient client

result

protected boolean result

magnitude

protected boolean magnitude

debug

protected int debug
Constructor Detail

Matcher

public Matcher()
Method Detail

setIf

public void setIf(java.lang.String prop)

setUnless

public void setUnless(java.lang.String prop)

getTestDescription

public java.lang.String getTestDescription()
Test description ( text representation of the test )


setExpectedResult

public void setExpectedResult(boolean b)

setMagnitude

public void setMagnitude(boolean b)

setDebug

public void setDebug(int d)
Display debug info


getMessage

public java.lang.String getMessage()
Return a message describing the reason of the failure or the test log


log

protected void log(java.lang.String s)
Add a message to the test log


getResult

public boolean getResult()
Result of the test


setHttpClient

public void setHttpClient(HttpClient req)
The test case


getHttpClient

public HttpClient getHttpClient()

setHttpRequest

public void setHttpRequest(HttpRequest req)
The request that generated the response


getHttpRequest

public HttpRequest getHttpRequest()

setHttpResponse

public void setHttpResponse(HttpResponse resp)
The response we'll match against


getHttpResponse

public HttpResponse getHttpResponse()

execute

public void execute()
Execute the test


skipTest

public boolean skipTest()
Check if test should be skipped



Copyright ? 2001 Apache Software Foundation. All Rights Reserved.