public class GroovyScriptExecutor extends Object implements org.junit.rules.TestRule
public class MuleApplicationTestCase {
@ClassRule
public static GroovyScriptExecutor executor = builder("/path/to/script.groovy").withProperty("property", "value");
@Test
public void useApplication() throws IOException {
// Groovy script is executed
// This code exercises the application
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
GroovyScriptExecutor.Builder |
| Modifier | Constructor and Description |
|---|---|
protected |
GroovyScriptExecutor(String scriptPath) |
|
GroovyScriptExecutor(String scriptPath,
Map<String,String> properties,
Map<String,Supplier<String>> propertiesUsingLambdas) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
static GroovyScriptExecutor.Builder |
builder(String scriptPath)
Creates a new
GroovyScriptExecutor.Builder for the construction of a GroovyScriptExecutor instance. |
public GroovyScriptExecutor(String scriptPath, Map<String,String> properties, Map<String,Supplier<String>> propertiesUsingLambdas)
protected GroovyScriptExecutor(String scriptPath)
public static GroovyScriptExecutor.Builder builder(String scriptPath)
GroovyScriptExecutor.Builder for the construction of a GroovyScriptExecutor instance.scriptPath - the full path of the groovy script to be executed.GroovyScriptExecutor.Builder instance.public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.