org.dbforms.util
Class HttpTestCaseGenerator

java.lang.Object
  extended by com.bitmechanic.maxq.generator.AbstractCodeGenerator
      extended by org.dbforms.util.HttpTestCaseGenerator
All Implemented Interfaces:
com.bitmechanic.maxq.generator.IScriptGenerator, com.bitmechanic.maxq.RequestObserver

public class HttpTestCaseGenerator
extends com.bitmechanic.maxq.generator.AbstractCodeGenerator

Generate a java JUnit test case. Take a look at the CodeGenerator Interface to see how to specify which one you want. The important information is that this class generates Java code.

Author:
Robert Dawson, Wayne Hearn
See Also:
IScriptGenerator

Field Summary
 
Fields inherited from class com.bitmechanic.maxq.generator.AbstractCodeGenerator
assertNumber, END_STATEMENT, jtidyConfigFile
 
Fields inherited from interface com.bitmechanic.maxq.generator.IScriptGenerator
EOL
 
Constructor Summary
HttpTestCaseGenerator(com.bitmechanic.maxq.IScriptAdapter adapter)
          Creates a new HttpTestCaseGenerator object.
 
Method Summary
protected  String createStatement(String text)
          Returns the supplied string left padded
 void doAddParameterToList(String name, String value)
          DOCUMENT ME!
 void doAssertResponse(String respCode)
          DOCUMENT ME!
 void doCallUrl(String url, String method, String data, String contentLength, String list)
          DOCUMENT ME!
 void doCreateList()
          DOCUMENT ME!
 void doLoad(String script)
          DOCUMENT ME!
 void doResponseForFile()
          DOCUMENT ME!
 void doResponseForStdOut(String url)
          DOCUMENT ME!
 void doSave(String path, String fileName)
          DOCUMENT ME!
 void doSetData(String data)
          DOCUMENT ME!
 void doStartRecording()
          DOCUMENT ME!
 void doStopRecording()
          DOCUMENT ME!
 void doTestUrlMessage(String url)
          DOCUMENT ME!
 void doTidyCode(String url)
          DOCUMENT ME!
protected  String getTestDeclarationText()
          DOCUMENT ME!
 String[] getValidFileExtensions()
          DOCUMENT ME!
 String parseTestName()
          DOCUMENT ME!
 
Methods inherited from class com.bitmechanic.maxq.generator.AbstractCodeGenerator
appendEOL, getDefaultTestName, getScript, getScriptAdapter, getTestName, getTestPath, isCpRspToFile, isCpRspToStdout, loadScriptAdapter, processRequest, processResponse, setDefaultTestName, setTestName, setTestPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpTestCaseGenerator

public HttpTestCaseGenerator(com.bitmechanic.maxq.IScriptAdapter adapter)
Creates a new HttpTestCaseGenerator object.

Parameters:
adapter - DOCUMENT ME!
Method Detail

getValidFileExtensions

public String[] getValidFileExtensions()
DOCUMENT ME!

Returns:
DOCUMENT ME!

doAddParameterToList

public void doAddParameterToList(String name,
                                 String value)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
value - DOCUMENT ME!

doAssertResponse

public void doAssertResponse(String respCode)
DOCUMENT ME!

Parameters:
respCode - DOCUMENT ME!

doCallUrl

public void doCallUrl(String url,
                      String method,
                      String data,
                      String contentLength,
                      String list)
DOCUMENT ME!

Parameters:
url - DOCUMENT ME!
method - DOCUMENT ME!
data - DOCUMENT ME!
contentLength - DOCUMENT ME!
list - DOCUMENT ME!

doCreateList

public void doCreateList()
DOCUMENT ME!


doLoad

public void doLoad(String script)
DOCUMENT ME!

Parameters:
script - DOCUMENT ME!

doResponseForFile

public void doResponseForFile()
DOCUMENT ME!


doResponseForStdOut

public void doResponseForStdOut(String url)
DOCUMENT ME!

Parameters:
url - DOCUMENT ME!

doSave

public void doSave(String path,
                   String fileName)
DOCUMENT ME!

Parameters:
path - DOCUMENT ME!
fileName - DOCUMENT ME!

doSetData

public void doSetData(String data)
DOCUMENT ME!

Parameters:
data - DOCUMENT ME!

doStartRecording

public void doStartRecording()
DOCUMENT ME!


doStopRecording

public void doStopRecording()
DOCUMENT ME!


doTestUrlMessage

public void doTestUrlMessage(String url)
DOCUMENT ME!

Parameters:
url - DOCUMENT ME!

doTidyCode

public void doTidyCode(String url)
DOCUMENT ME!

Parameters:
url - DOCUMENT ME!

parseTestName

public String parseTestName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getTestDeclarationText

protected String getTestDeclarationText()
DOCUMENT ME!

Returns:
DOCUMENT ME!

createStatement

protected String createStatement(String text)
Returns the supplied string left padded

Parameters:
text -
Returns:


Copyright © 2002-2006 DbForms. All Rights Reserved.