org.freecompany.imp
Class JUnit

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
              extended by org.freecompany.imp.JUnit
All Implemented Interfaces:
java.lang.Cloneable

public class JUnit
extends org.apache.tools.ant.taskdefs.optional.junit.JUnitTask

This task extends the core task for running unit tests to enable customizable logging per run. The behavior is identical to the base task class except that an optional log level can be specified which will be universally applied against all packages in the master logger. Existing levels for each handler and the root logger are saved and reset after the tests complete.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode, org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.JUnitLogOutputStream, org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.JUnitLogStreamHandler, org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute, org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.TestResultHolder
 
Field Summary
protected  java.util.logging.Level level
           
protected  java.lang.String[] packages
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
TESTLISTENER_PREFIX
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
JUnit()
          For some unknown reason the base class constructor throws Exception so our default constructor must match.
 
Method Summary
 void execute()
           
 void setLevel(java.lang.String level)
           
 void setLoggers(java.lang.String packages)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
actOnTestResult, actOnTestResult, addAssertions, addClasspathEntry, addConfiguredSysproperty, addEnv, addFormatter, addSysproperty, addSyspropertyset, addTest, allTests, cleanup, createBatchTest, createBootclasspath, createClasspath, createJvmarg, createPermissions, createWatchdog, execute, execute, executeOrQueue, getCommandline, getDefaultOutput, getIndividualTests, getOutput, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, setCloneVm, setDir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setForkMode, setHaltonerror, setHaltonfailure, setIncludeantruntime, setJvm, setMaxmemory, setNewenvironment, setOutputToFormatters, setPrintsummary, setReloading, setShowOutput, setTempdir, setTimeout, setupJUnitDelegate
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

level

protected java.util.logging.Level level

packages

protected java.lang.String[] packages
Constructor Detail

JUnit

public JUnit()
      throws java.lang.Exception
For some unknown reason the base class constructor throws Exception so our default constructor must match.

Throws:
java.lang.Exception
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
Throws:
org.apache.tools.ant.BuildException

setLoggers

public void setLoggers(java.lang.String packages)

setLevel

public void setLevel(java.lang.String level)