Initial import.

This commit is contained in:
Erik C. Thauvin 2006-02-24 12:38:42 +00:00
parent 1457c02c00
commit f473693052
25 changed files with 2468 additions and 0 deletions

View file

@ -0,0 +1,16 @@
## Output Pattern definition file.
##
## Available variables:
## $SOURCEPATH$ - location where source code for current project resides
## $PACKAGE$ - package path where TestedClass resides
## $FILENAME$ - Filename of the testClass. Note: if you modify filename only
## the file name will be affected not a class name
##
## Anything before $SOURCEPATH$ will be ignored. If you need to go outside of the
## sourcepath use $SOURCEPATH$/../
##
## For project sepcific configuration you can add seporate line for every project.
## Earch line must start with project name. i.e
## myproject=$SOURCEPATH$/testing/$PACKAGE$/$FILENAME$
## If project specific configuration does not exist, the following line will be used.
output=$SOURCEPATH$/test/$PACKAGE$/$FILENAME$

79
resources/testnggen.vm Normal file
View file

@ -0,0 +1,79 @@
########################################################################################
##
## Available variables:
## $entryList.methodList - ArrayList of method names
## $entryList.fieldList - ArrayList of class scope field names
## $entryList.className - class name
## $entryList.packageName - package name
## $today - Today's date in "MM/DD/YYYY" format
## $todayLong - Today's date in "Month Day, Year" format
## $author - The author (current user) name.
## $hasAnnotations - Is set to true if annotations (>= JDK 1.5) are available.
##
## You can configure the output class name using "testClass" variable below.
## Here are some examples:
## Test${entry.ClassName} - will produce TestSomeClass
## ${entry.className}Test - will produce SomeClassTest
##
########################################################################################
##
#macro (cap $strIn)$strIn.valueOf($strIn.charAt(0)).toUpperCase()$strIn.substring(1)#end
## Iteratre through the list and generate testcase for every entry.
#foreach ($entry in $entryList)
#set( $testClass="${entry.className}Test")
##
package $entry.packageName;
#if($hasAnnotations)
import org.testng.annotations.*;
#else
import org.testng.Assert;
#end
/**
* ${entry.className} Tester.
*
* @author $author
* @version $Revision$, $Date$
* @created $todayLong
* @since 1.0
*/
public class $testClass
{
#if($hasAnnotations)
@Configuration(beforeTestClass = true)
#else
/**
* Test Setup.
*
* @testng.configuration beforeTestClass = "true"
*/
#end
public void setUp()
{
//TODO: Code that will be invoked when this test is instantiated
}
#foreach($method in $entry.methodList)
#if($hasAnnotations)
@Test
#else
/**
* $method Tester.
*
* @testng.test
*/
#end
public void test#cap(${method})()
{
//TODO: Test goes here...
#if($hasAnnotations)
assert false : "test#cap(${method}) not implemented.";
#else
Assert.assertFalse(true, "test#cap(${method}) not implemented.");
#end
}
#end
}
#end