public final class CompilationRule extends Object implements org.junit.rules.TestRule
JUnit4 Rule that executes tests such that a instances of Elements and
Types are available during execution.
To use this rule in a test, just add the following field:
@Rule public CompilationRule compilationRule = new CompilationRule();| Constructor and Description |
|---|
CompilationRule() |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
Elements |
getElements()
Returns the
Elements instance associated with the current execution of the rule. |
Types |
getTypes()
Returns the
Types instance associated with the current execution of the rule. |
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRulepublic Elements getElements()
Elements instance associated with the current execution of the rule.IllegalStateException - if this method is invoked outside the execution of the rule.public Types getTypes()
Types instance associated with the current execution of the rule.IllegalStateException - if this method is invoked outside the execution of the rule.Copyright © 2013–2020. All rights reserved.