Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lenya.cms.task
Class AntTaskTest  view AntTaskTest download AntTaskTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.lenya.cms.task.AntTaskTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DocumentCopyTaskTest, DocumentDeactivateTaskTest, DocumentMoveTaskTest, DocumentRenameTaskTest, PublisherTest

public class AntTaskTest
extends junit.framework.TestCase

Class for testing AntTasks. Extend this class to test your own AntTask. The target can be passed as a command-line argument. If the argument is omitted, the target is "test". Override getTarget() 55 to provide a hard-coded target. Override evaluateTest() 55 to add your evaluation code.


Field Summary
private static java.lang.String target
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
AntTaskTest(java.lang.String test)
          Creates a new AntTaskTest object.
 
Method Summary
protected  void doTest(java.lang.String target)
          Tests an AntTask.
protected  void evaluateTest()
          Override this method to add your test evaluation code.
static junit.framework.Test getSuite()
          Creates a test suite.
protected  java.lang.String getTarget()
          Returns the target to test.
protected  Parameters getTaskParameters()
          Returns the task parameters.
static void initialize(java.lang.String[] args)
          Initializes the parameters.
static void main(java.lang.String[] args)
          The main program for the AntTaskTest class
protected  void prepareTest()
          Override this method to prepare your test.
protected  void setUp()
          (non-Javadoc)
 void testAntTask()
          Tests the AntTask class.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

target

private static java.lang.String target
Constructor Detail

AntTaskTest

public AntTaskTest(java.lang.String test)
Creates a new AntTaskTest object.

Method Detail

main

public static void main(java.lang.String[] args)
The main program for the AntTaskTest class


initialize

public static void initialize(java.lang.String[] args)
Initializes the parameters. Call this method from your subclass main(String[]) 55 method.


getSuite

public static junit.framework.Test getSuite()
Creates a test suite.


testAntTask

public final void testAntTask()
                       throws java.lang.Exception
Tests the AntTask class. Template method, please override evaluateTest() 55 and getTarget() 55 and prepareTest() 55 .


getTarget

protected java.lang.String getTarget()
Returns the target to test.


doTest

protected void doTest(java.lang.String target)
               throws ExecutionException,
                      ParameterException,
                      ConfigurationException,
                      org.xml.sax.SAXException,
                      java.io.IOException
Tests an AntTask.


getTaskParameters

protected Parameters getTaskParameters()
Returns the task parameters. You don't need to specify the publication-id.


prepareTest

protected void prepareTest()
                    throws java.lang.Exception
Override this method to prepare your test.


evaluateTest

protected void evaluateTest()
                     throws java.lang.Exception
Override this method to add your test evaluation code.


setUp

protected void setUp()
              throws java.lang.Exception
(non-Javadoc)