Package groovy.junit6.plugin
Class JUnit6Runner
java.lang.Object
groovy.junit6.plugin.JUnit6Runner
- All Implemented Interfaces:
GroovyRunner
Integration code for running JUnit 6 (Jupiter) tests in Groovy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRun(Class<?> scriptClass, GroovyClassLoader loader) Utility method to check via reflection if the parsed class appears to be a JUnit Jupiter test, i.e.run(Class<?> scriptClass, GroovyClassLoader loader) Utility method to run a JUnit 6 test.
-
Constructor Details
-
JUnit6Runner
public JUnit6Runner()
-
-
Method Details
-
canRun
Utility method to check via reflection if the parsed class appears to be a JUnit Jupiter test, i.e. checks whether it appears to be using the relevant annotations.- Specified by:
canRunin interfaceGroovyRunner- Parameters:
scriptClass- the class we want to checkloader- the GroovyClassLoader to use to find classes- Returns:
- true if the class appears to be a compatible test
-
run
Utility method to run a JUnit 6 test.- Specified by:
runin interfaceGroovyRunner- Parameters:
scriptClass- the class we want to run as a testloader- the class loader to use- Returns:
- the result of running the test
-