Package org.robolectric
Class DefaultTestLifecycle
- java.lang.Object
-
- org.robolectric.DefaultTestLifecycle
-
- All Implemented Interfaces:
TestLifecycle
public class DefaultTestLifecycle extends Object implements TestLifecycle
The defaultTestLifecycleused by Robolectric.Owing to tradeoffs, this class is not guaranteed to work with
LazyApplicationenabled 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 voidafterTest(Method method)Called 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.
-
-
-
Method Detail
-
beforeTest
public void beforeTest(Method method)
Called before each test method is run.- Specified by:
beforeTestin interfaceTestLifecycle- Parameters:
method- the test method about to be run
-
prepareTest
public void prepareTest(Object test)
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
public void afterTest(Method method)
Called after each test method is run.- Specified by:
afterTestin interfaceTestLifecycle- Parameters:
method- the test method that just ran.
-
-