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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after each test method is run.voidbeforeTest(Method method) Called before each test method is run.voidprepareTest(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:
beforeTestin interfaceTestLifecycle- Parameters:
method- the test method about to be run
-
prepareTest
Description copied from interface:TestLifecycleCalled after each test method is run.- Specified by:
prepareTestin 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:
afterTestin interfaceTestLifecycle- Parameters:
method- the test method that just ran.
-