groovy.util
Class GroovyTestSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended bygroovy.util.GroovyTestSuite
All Implemented Interfaces:
junit.framework.Test

public class GroovyTestSuite
extends junit.framework.TestSuite

A TestSuite which will run a Groovy unit test case inside any Java IDE either as a unit test case or as an application.

You can specify the GroovyUnitTest to run by running this class as an appplication and specifying the script to run on the command line.

java groovy.util.GroovyTestSuite src/test/Foo.groovy

Or to run the test suite as a unit test suite in an IDE you can use the 'test' system property to define the test script to run. e.g. pass this into the JVM when the unit test plugin runs...

-Dtest=src/test/Foo.groovy

Version:
$Revision: 1.9 $
Author:
James Strachan

Field Summary
protected static java.lang.String file
           
protected  GroovyClassLoader loader
           
 
Fields inherited from class junit.framework.TestSuite
 
Constructor Summary
GroovyTestSuite()
           
 
Method Summary
 java.lang.Class compile(java.lang.String fileName)
           
 void loadTestSuite()
           
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

protected static java.lang.String file

loader

protected GroovyClassLoader loader
Constructor Detail

GroovyTestSuite

public GroovyTestSuite()
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

loadTestSuite

public void loadTestSuite()
                   throws java.lang.Exception
Throws:
java.lang.Exception

compile

public java.lang.Class compile(java.lang.String fileName)
                        throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2005 The Codehaus. All Rights Reserved.