public class SandboxTestRunner
extends org.junit.runners.BlockJUnit4ClassRunner
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SandboxTestRunner.HelperTestRunner |
| Constructor and Description |
|---|
SandboxTestRunner(java.lang.Class<?> klass) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterClass() |
protected void |
afterTest(org.junit.runners.model.FrameworkMethod method,
java.lang.reflect.Method bootstrappedMethod) |
protected void |
beforeTest(org.robolectric.internal.bytecode.Sandbox sandbox,
org.junit.runners.model.FrameworkMethod method,
java.lang.reflect.Method bootstrappedMethod) |
protected org.junit.runners.model.Statement |
classBlock(org.junit.runner.notification.RunNotifier notifier) |
protected void |
configureShadows(org.junit.runners.model.FrameworkMethod method,
org.robolectric.internal.bytecode.Sandbox sandbox) |
protected org.robolectric.internal.bytecode.ClassHandler |
createClassHandler(org.robolectric.internal.bytecode.ShadowMap shadowMap,
org.robolectric.internal.bytecode.Sandbox sandbox) |
protected org.robolectric.internal.bytecode.InstrumentationConfiguration |
createClassLoaderConfig(org.junit.runners.model.FrameworkMethod method)
Create an
InstrumentationConfiguration suitable for the provided FrameworkMethod. |
protected org.robolectric.internal.bytecode.ShadowMap |
createShadowMap() |
protected void |
finallyAfterTest(org.junit.runners.model.FrameworkMethod method) |
protected java.util.Collection<org.robolectric.internal.bytecode.Interceptor> |
findInterceptors() |
protected java.lang.Class<?>[] |
getExtraShadows(org.junit.runners.model.FrameworkMethod method) |
protected SandboxTestRunner.HelperTestRunner |
getHelperTestRunner(java.lang.Class bootstrappedTestClass) |
protected org.robolectric.internal.bytecode.Interceptors |
getInterceptors() |
protected org.robolectric.internal.bytecode.Sandbox |
getSandbox(org.junit.runners.model.FrameworkMethod method) |
protected org.junit.runners.model.Statement |
methodBlock(org.junit.runners.model.FrameworkMethod method) |
protected void |
runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier) |
protected boolean |
shouldIgnore(org.junit.runners.model.FrameworkMethod method) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutpublic SandboxTestRunner(java.lang.Class<?> klass)
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError@Nonnull protected java.util.Collection<org.robolectric.internal.bytecode.Interceptor> findInterceptors()
@Nonnull protected org.robolectric.internal.bytecode.Interceptors getInterceptors()
protected org.junit.runners.model.Statement classBlock(org.junit.runner.notification.RunNotifier notifier)
classBlock in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected void afterClass()
protected void runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier)
runChild in class org.junit.runners.BlockJUnit4ClassRunner@Nonnull protected org.robolectric.internal.bytecode.Sandbox getSandbox(org.junit.runners.model.FrameworkMethod method)
@Nonnull protected org.robolectric.internal.bytecode.InstrumentationConfiguration createClassLoaderConfig(org.junit.runners.model.FrameworkMethod method)
Create an InstrumentationConfiguration suitable for the provided FrameworkMethod.
Custom TestRunner subclasses may wish to override this method to provide alternate configuration.
method - the test method that’s about to runInstrumentationConfigurationprotected void configureShadows(org.junit.runners.model.FrameworkMethod method,
org.robolectric.internal.bytecode.Sandbox sandbox)
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
methodBlock in class org.junit.runners.BlockJUnit4ClassRunnerprotected void beforeTest(org.robolectric.internal.bytecode.Sandbox sandbox,
org.junit.runners.model.FrameworkMethod method,
java.lang.reflect.Method bootstrappedMethod)
throws java.lang.Throwable
java.lang.Throwableprotected void afterTest(org.junit.runners.model.FrameworkMethod method,
java.lang.reflect.Method bootstrappedMethod)
protected void finallyAfterTest(org.junit.runners.model.FrameworkMethod method)
protected SandboxTestRunner.HelperTestRunner getHelperTestRunner(java.lang.Class bootstrappedTestClass)
@Nonnull protected java.lang.Class<?>[] getExtraShadows(org.junit.runners.model.FrameworkMethod method)
protected org.robolectric.internal.bytecode.ShadowMap createShadowMap()
@Nonnull
protected org.robolectric.internal.bytecode.ClassHandler createClassHandler(org.robolectric.internal.bytecode.ShadowMap shadowMap,
org.robolectric.internal.bytecode.Sandbox sandbox)
protected boolean shouldIgnore(org.junit.runners.model.FrameworkMethod method)