T
- Type of annotation that configures the test rulepublic abstract class AbstractTestRule<T extends Annotation> extends Object implements org.junit.rules.TestRule
Constructor and Description |
---|
AbstractTestRule(org.junit.runners.model.FrameworkMethod frameworkMethod,
Class<T> annotationType,
Class<A> alternativeAnnotationType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
after()
Called after wrapped statement.
|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
JUnit test rule contract.
|
protected void |
before()
Called before wrapped statement.
|
T |
getAnnotation()
Return the configuring annotation.
|
Method |
getTestMethod()
Return the test method on which the test rule is applied.
|
public AbstractTestRule(org.junit.runners.model.FrameworkMethod frameworkMethod, Class<T> annotationType, Class<A> alternativeAnnotationType)
A
- Generic support paramframeworkMethod
- JUnit framework method on which the test rule is being appliedannotationType
- Type of annotation that configures the test rulealternativeAnnotationType
- Alternative annotation typepublic org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
protected void before() throws Throwable
Throwable
- Anythingprotected void after() throws Throwable
Throwable
- Anythingpublic T getAnnotation()
public Method getTestMethod()
Copyright © 2011–2020 Lastware, sro.. All rights reserved.