Class ExternalResourceSupport
java.lang.Object
org.junit.jupiter.migrationsupport.rules.ExternalResourceSupport
- All Implemented Interfaces:
 AfterEachCallback,BeforeEachCallback,Extension
@API(status=STABLE,
     since="5.7")
public class ExternalResourceSupport
extends Object
implements BeforeEachCallback, AfterEachCallback
This 
Extension provides native support for subclasses of
 the ExternalResource rule from JUnit 4.
 @Rule-annotated fields as well as methods are supported.
 
By using this class-level extension on a test class such
 ExternalResource implementations in legacy code bases
 can be left unchanged including the JUnit 4 rule import statements.
 
However, if you intend to develop a new extension for JUnit 5 please use the new extension model of JUnit Jupiter instead of the rule-based model of JUnit 4.
- Since:
 - 5.0
 - See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidafterEach(ExtensionContext context) Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.voidbeforeEach(ExtensionContext context) Callback that is invoked before an individual test and any user-defined setup methods for that test have been executed. 
- 
Constructor Details
- 
ExternalResourceSupport
public ExternalResourceSupport() 
 - 
 - 
Method Details
- 
beforeEach
Description copied from interface:BeforeEachCallbackCallback that is invoked before an individual test and any user-defined setup methods for that test have been executed.- Specified by:
 beforeEachin interfaceBeforeEachCallback- Parameters:
 context- the current extension context; nevernull- Throws:
 Exception
 - 
afterEach
Description copied from interface:AfterEachCallbackCallback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.- Specified by:
 afterEachin interfaceAfterEachCallback- Parameters:
 context- the current extension context; nevernull- Throws:
 Exception
 
 -