public abstract class CompositeTestRule extends Object implements org.junit.rules.TestRule
TestRule that is composed of other TestRules.| Constructor and Description |
|---|
CompositeTestRule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
Takes all the rules in
testRules() and applies them to this Test Rule. |
protected void |
before() |
void |
execute(Runnable runnable)
Execute the given
Runnable within this context. |
protected abstract List<org.junit.rules.TestRule> |
testRules() |
protected abstract List<org.junit.rules.TestRule> testRules()
public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
testRules() and applies them to this Test Rule.
This is essential because the composite rule may depend on these rules being executed.apply in interface org.junit.rules.TestRulepublic final void execute(Runnable runnable)
Runnable within this context. This is useful in cases when you can't use a JUnit
Rule or ClassRule annotation.protected void after()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.