prantl.ant.eclipse
Class EclipseTaskTest

java.lang.Object
  extended by TestCase
      extended by prantl.ant.eclipse.EclipseTaskTest

public class EclipseTaskTest
extends TestCase

Test fixture with unit test cases for the class EclipseTask.

Since:
Ant-Eclipse 1.0
Author:
Ferdinand Prantl <prantl@users.sourceforge.net>
See Also:
EclipseTask

Constructor Summary
EclipseTaskTest()
          Creates a new instance of the test fixture.
 
Method Summary
static java.lang.String join(java.lang.String[] input, java.lang.String delimiter)
          Splits the input array into a string using the specified delimiter.
static java.lang.String[] split(java.lang.String input, java.lang.String delimiter)
          Splits the input string into an array of strings using the specified delimiter.
 void testExecuteWithEmptyEclipseElement()
          Tests executing the task with the following configuration: <eclipse />
 void testExecuteWithEmptyProjectElement()
          Tests executing the task with the following configuration: <eclipse> <project /> </eclipse>
 void testExecuteWithProjectElementWithName()
          Tests executing the task with the following configuration: <eclipse> <project /> </eclipse>
 void testExecuteWithSettingsElementWithVersionAndEncoding()
          Tests executing the task with the following configuration: <eclipse> <settings> <resources version="2" encoding="UTF-8" /> </settings> </eclipse>
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseTaskTest

public EclipseTaskTest()
Creates a new instance of the test fixture. Default constructor.

Since:
Ant-Eclipse 1.0
Method Detail

testExecuteWithEmptyEclipseElement

public void testExecuteWithEmptyEclipseElement()
                                        throws java.lang.Exception
Tests executing the task with the following configuration:
   <eclipse />
 

Throws:
java.lang.Exception - If the task execution fails.

testExecuteWithSettingsElementWithVersionAndEncoding

public void testExecuteWithSettingsElementWithVersionAndEncoding()
                                                          throws java.lang.Exception
Tests executing the task with the following configuration:
   <eclipse>
     <settings>
       <resources version="2" encoding="UTF-8" />
     </settings>
   </eclipse>
 

Throws:
java.lang.Exception - If the task execution fails.

testExecuteWithEmptyProjectElement

public void testExecuteWithEmptyProjectElement()
                                        throws java.lang.Exception
Tests executing the task with the following configuration:
   <eclipse>
     <project />
   </eclipse>
 

Throws:
java.lang.Exception - If the task execution fails.

testExecuteWithProjectElementWithName

public void testExecuteWithProjectElementWithName()
                                           throws java.lang.Exception
Tests executing the task with the following configuration:
   <eclipse>
     <project />
   </eclipse>
 

Throws:
java.lang.Exception - If the task execution fails.

split

public static java.lang.String[] split(java.lang.String input,
                                       java.lang.String delimiter)
Splits the input string into an array of strings using the specified delimiter.

Parameters:
input - The input string to be splitted.
delimiter - The delimiting token.
Returns:
An array with strings as delimited parts of the input.
Throws:
java.lang.NullPointerException - If some of the input parameters are null.

join

public static java.lang.String join(java.lang.String[] input,
                                    java.lang.String delimiter)
Splits the input array into a string using the specified delimiter.

Parameters:
input - The input array to be joined.
delimiter - The delimiting token.
Returns:
An string joined with the specified delimiter from he input array.
Throws:
java.lang.NullPointerException - If some of the input parameters are null.