Package org.robolectric
Class DefaultTestLifecycle
- java.lang.Object
-
- org.robolectric.DefaultTestLifecycle
-
- All Implemented Interfaces:
TestLifecycle
public class DefaultTestLifecycle extends Object implements TestLifecycle
The defaultTestLifecycle
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 Constructor Description DefaultTestLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTest(Method method)
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.
-
-
-
Method Detail
-
beforeTest
public void beforeTest(Method method)
Called before each test method is run.- Specified by:
beforeTest
in interfaceTestLifecycle
- Parameters:
method
- the test method about to be run
-
prepareTest
public void prepareTest(Object test)
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
public void afterTest(Method method)
Called after each test method is run.- Specified by:
afterTest
in interfaceTestLifecycle
- Parameters:
method
- the test method that just ran.
-
-