JUnit-addons
version 1.4

junitx.ant
Class TestClassValidatorTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--junitx.ant.TestClassValidatorTask

public class TestClassValidatorTask
extends org.apache.tools.ant.Task

Validate a JUnit TestCase or TestSuite and outline potential errors in the definition of the classes.

Usage

  <taskdef name="TestValidator"
              classname="junitx.ant.TestClassValidatorTask"
              classpath="junit-addons-3.7.x.jar" />

  <validator verbose="off">
    <classpath>
      <pathelement location="classes" />
      <fileset dir="lib">
        <include name="\*\*.jar"/>
        <include name="\*\*.zip"/>
      </fileset>
    </classpath>
    <fileset dir="classes">
      <include name="*-/*Suite.class"/>
      <include name="*-/*Test.class"/>
    </fileset>
  </validator>
 

Version:
$Revision: 1.8 $ $Date: 2003/02/06 20:43:52 $
Author:
Vladimir R. Bossicard

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
TestClassValidatorTask()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Add a new fileset instance to this task.
 org.apache.tools.ant.types.Path createClasspath()
          Creates a nested classpath element
 void execute()
          Called by the project to let the task do it's work.
 void setClasspath(org.apache.tools.ant.types.Path classpath)
          Set the classpath to be used for this validation.
 void setClasspathRef(org.apache.tools.ant.types.Reference r)
          Adds a reference to a CLASSPATH defined elsewhere.
 void setVerbose(boolean verbose)
          Used to force listing of all names of processed files.
 
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

TestClassValidatorTask

public TestClassValidatorTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Called by the project to let the task do it's work.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if someting goes wrong with the build

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path classpath)
Set the classpath to be used for this validation.


createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Creates a nested classpath element


setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a CLASSPATH defined elsewhere.


addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Add a new fileset instance to this task. Whatever the fileset is, only filename that are .java or .class will be considered as 'candidates'.

Parameters:
set - the new fileset containing the rules to get the testcases.

setVerbose

public void setVerbose(boolean verbose)
Used to force listing of all names of processed files.

Parameters:
verbose - "true" or "on"

JUnit-addons
version 1.4

Copyright © 2002-2003 Vladimir R. Bossicard. All Rights Reserved.