net.sourceforge.anttestsetgen
Class TestSetGenerator

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.JDBCTask
              extended bynet.sourceforge.anttestsetgen.TestSetGenerator

public class TestSetGenerator
extends org.apache.tools.ant.taskdefs.JDBCTask

The TestSetGenerator is an extension to Ant. The TestSetGenerator can be used to generated a property file based on the results of database queries. This is usefull when unit tests are run on a database that changes reguarly from content.

Version:
$Id: TestSetGenerator.java,v 1.4 2004/01/04 15:00:18 mcjansen Exp $
Author:
Marco Jansen (Contrado Technologies)

Field Summary
 
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
TestSetGenerator()
           
 
Method Summary
 void addConfiguredOutput(Output output)
          Add a new output type.
 void addConfiguredTestSet(TestSet testSet)
          Add a TestSet to the TestSetGenerator.
 void execute()
          Execute the TestSetGenerator task.
 java.util.List getOutputs()
          Retrieve a list with output types.
 java.util.List getTestSets()
          Retrieve the TestSets that are in this TestSetGenerator.
 
Methods inherited from class org.apache.tools.ant.taskdefs.JDBCTask
createClasspath, getClasspath, getConnection, getLoader, getLoaderMap, getPassword, getRdbms, getUrl, getUserId, getVersion, isAutocommit, isCaching, isValidRdbms, setAutocommit, setCaching, setClasspath, setClasspathRef, setDriver, setPassword, setRdbms, setUrl, setUserid, setVersion
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, 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

TestSetGenerator

public TestSetGenerator()
Method Detail

addConfiguredTestSet

public void addConfiguredTestSet(TestSet testSet)
Add a TestSet to the TestSetGenerator.

Parameters:
testSet - The TestSet to be added

getTestSets

public java.util.List getTestSets()
Retrieve the TestSets that are in this TestSetGenerator.

Returns:
A list with TestSet objects
See Also:
TestSet, addConfiguredTestSet(net.sourceforge.anttestsetgen.TestSet)

addConfiguredOutput

public void addConfiguredOutput(Output output)
Add a new output type.

Parameters:
output - The new output type.

getOutputs

public java.util.List getOutputs()
Retrieve a list with output types.

Returns:
A list with output types.
See Also:
Output

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute the TestSetGenerator task. This task will generate a property file. The Sql-query in every TestSet will be executed. Based on the mapping a number of columns will be written to the property file.

Throws:
org.apache.tools.ant.BuildException - A BuildException is thrown in case there is an error in the definition of the execution of the task.


Copyright © 2003-2004 Marco Jansen (Contrado Technologies). All Rights Reserved.