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(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 |
configureSandbox(Sandbox sandbox,
org.junit.runners.model.FrameworkMethod method) |
protected ClassHandler |
createClassHandler(ShadowMap shadowMap,
Sandbox sandbox) |
protected InstrumentationConfiguration |
createClassLoaderConfig(org.junit.runners.model.FrameworkMethod method)
Create an
InstrumentationConfiguration suitable for the provided FrameworkMethod . |
protected ShadowMap |
createShadowMap() |
protected void |
finallyAfterTest(org.junit.runners.model.FrameworkMethod method) |
protected java.util.Collection<Interceptor> |
findInterceptors() |
protected java.lang.Class<?>[] |
getExtraShadows(org.junit.runners.model.FrameworkMethod method) |
protected SandboxTestRunner.HelperTestRunner |
getHelperTestRunner(java.lang.Class bootstrappedTestClass) |
protected Interceptors |
getInterceptors() |
protected java.lang.Iterable<PerfStatsReporter> |
getPerfStatsReporters() |
protected 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, withPotentialTimeout
public SandboxTestRunner(java.lang.Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
@Nonnull protected java.lang.Iterable<PerfStatsReporter> getPerfStatsReporters()
@Nonnull protected java.util.Collection<Interceptor> findInterceptors()
@Nonnull protected 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 Sandbox getSandbox(org.junit.runners.model.FrameworkMethod method)
@Nonnull protected 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 runInstrumentationConfiguration
protected void configureSandbox(Sandbox sandbox, org.junit.runners.model.FrameworkMethod method)
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
methodBlock
in class org.junit.runners.BlockJUnit4ClassRunner
protected void beforeTest(Sandbox sandbox, org.junit.runners.model.FrameworkMethod method, java.lang.reflect.Method bootstrappedMethod) throws java.lang.Throwable
java.lang.Throwable
protected 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 ShadowMap createShadowMap()
@Nonnull protected ClassHandler createClassHandler(ShadowMap shadowMap, Sandbox sandbox)
protected boolean shouldIgnore(org.junit.runners.model.FrameworkMethod method)