Top Description Constructors Methods
org.codehaus.groovy.vmplugin.v5

public Class JUnit4Utils

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
groovy.lang.GroovyClassLoader, .GroovyRuntimeException, org.codehaus.groovy.runtime.InvokerHelper, java.lang.annotation.Annotation, java.lang.reflect.Method, java.util.List

Deprecated

use org.apache.groovy.plugin.GroovyRunnerRegistry

Java 5 code for working with JUnit 4 tests.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static Boolean

Returns:

true if the class appears to be a test
realIsJUnit4Test
(Class<T>
the class we want to check
scriptClass
,
GroovyClassLoader
the GroovyClassLoader to use to find classes
loader
)

Utility method to check via reflection if the parsed class appears to be a JUnit4 test.

pack-priv static Object

Returns:

the result of running the test
realRunJUnit4Test
(Class<T>
the class we want to run as a test
scriptClass
,
GroovyClassLoader loader)

Utility method to run a JUnit4 test.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JUnit4Utilsback to summary
public JUnit4Utils()

Method Detail

realIsJUnit4Testback to summary
pack-priv static Boolean realIsJUnit4Test(Class<T> scriptClass, GroovyClassLoader loader)

Utility method to check via reflection if the parsed class appears to be a JUnit4 test.

Parameters
scriptClass:Class<T>

the class we want to check

loader:GroovyClassLoader

the GroovyClassLoader to use to find classes

Returns:Boolean

true if the class appears to be a test

realRunJUnit4Testback to summary
pack-priv static Object realRunJUnit4Test(Class<T> scriptClass, GroovyClassLoader loader)

Utility method to run a JUnit4 test.

Parameters
scriptClass:Class<T>

the class we want to run as a test

Returns:Object

the result of running the test