java.lang.Object
org.apache.cactus.integration.maven.CactusScanner
- public class CactusScanner
- extends java.lang.Object
Process org.apache.tools.ant.types.FileSet and extracts classes that are Cactus tests. As
a Cactus test can be a simple JUnit test case wrapped in a Cactus suite,
it is very difficult to find out only Cactus tests. Thus, in this version,
we are only finding JUnit tests.
A class is considered to be a JUnit Test Case if:
- It extends junit.framework.TestCase
- It is not abstract
- It has at least one method that starts with "test", returns void and
takes no parameters
- Version:
- $Id: CactusScanner.java,v 1.3 2004/02/29 16:34:44 vmassol Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private org.apache.commons.logging.Log log
- Log instance.
project
private org.apache.tools.ant.Project project
- The Ant project
cactusTests
private java.util.List cactusTests
- Lists of Cactus class names that were found in the org.apache.tools.ant.types.FileSet
CactusScanner
public CactusScanner()
setProject
public void setProject(org.apache.tools.ant.Project theProject)
clear
public void clear()
- Remove all Cactus class names that were found in the
Fileset
iterator
public java.util.Iterator iterator()
processFileSet
public void processFileSet(org.apache.tools.ant.types.FileSet theFileset,
org.apache.tools.ant.types.Path theClasspath)
- Finds the Cactus test cases from a list of files.
isJUnitTestCase
private boolean isJUnitTestCase(java.lang.String theClassName,
org.apache.tools.ant.types.Path theClasspath)
loadClass
private java.lang.Class loadClass(java.lang.String theClassName,
org.apache.tools.ant.types.Path theClasspath)
createClassLoader
private java.lang.ClassLoader createClassLoader(org.apache.tools.ant.types.Path theClasspath)