Package org.robolectric
Class DefaultTestLifecycle
java.lang.Object
org.robolectric.DefaultTestLifecycle
- All Implemented Interfaces:
TestLifecycle
The default
TestLifecycle
used by Robolectric.
Owing to tradeoffs, this class is not guaranteed to work with LazyApplication
enabled on tests where the application
is inferred from the apk (instead of explicitly specified in AndroidManifest.xml).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called after each test method is run.void
beforeTest
(Method method) Called before each test method is run.void
prepareTest
(Object test) Called after each test method is run.
-
Constructor Details
-
DefaultTestLifecycle
public DefaultTestLifecycle()
-
-
Method Details
-
beforeTest
Called before each test method is run.- Specified by:
beforeTest
in interfaceTestLifecycle
- Parameters:
method
- the test method about to be run
-
prepareTest
Description copied from interface:TestLifecycle
Called after each test method is run.- Specified by:
prepareTest
in interfaceTestLifecycle
- Parameters:
test
- the instance of the test class that is about to be used
-
afterTest
Called after each test method is run.- Specified by:
afterTest
in interfaceTestLifecycle
- Parameters:
method
- the test method that just ran.
-