Package org.robolectric.internal
Class SandboxTestRunner.HelperTestRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
- org.junit.runners.BlockJUnit4ClassRunner
-
- org.robolectric.internal.SandboxTestRunner.HelperTestRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
- Direct Known Subclasses:
RobolectricTestRunner.HelperTestRunner
- Enclosing class:
- SandboxTestRunner
protected static class SandboxTestRunner.HelperTestRunner extends org.junit.runners.BlockJUnit4ClassRunner
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.runners.model.FrameworkMethodframeworkMethod
-
Constructor Summary
Constructors Constructor Description HelperTestRunner(Class<?> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runners.model.StatementmethodBlock(org.junit.runners.model.FrameworkMethod method)protected org.junit.runners.model.StatementmethodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)For tests with a timeout, we need to wrap the test method execution (but not@Befores or@Afters in aTimeLimitedStatement.protected StringtestName(org.junit.runners.model.FrameworkMethod method)protected org.junit.runners.model.StatementwithPotentialTimeout(org.junit.runners.model.FrameworkMethod method, Object test, org.junit.runners.model.Statement next)Disables JUnit's normal timeout mode strategy.-
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, possiblyExpectingExceptions, rules, runChild, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores
-
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
-
-
-
-
Constructor Detail
-
HelperTestRunner
public HelperTestRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Detail
-
methodBlock
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
- Overrides:
methodBlockin classorg.junit.runners.BlockJUnit4ClassRunner
-
methodInvoker
protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)For tests with a timeout, we need to wrap the test method execution (but not@Befores or@Afters in aTimeLimitedStatement. JUnit's built-inFailOnTimeoutstatement causes the test method (but not@Befores or@Afters) to be run on a short-lived thread. This is inadequate for our purposes; we want to guarantee that every entry point to test code is run from the same thread.- Overrides:
methodInvokerin classorg.junit.runners.BlockJUnit4ClassRunner
-
withPotentialTimeout
protected org.junit.runners.model.Statement withPotentialTimeout(org.junit.runners.model.FrameworkMethod method, Object test, org.junit.runners.model.Statement next)Disables JUnit's normal timeout mode strategy.- Overrides:
withPotentialTimeoutin classorg.junit.runners.BlockJUnit4ClassRunner- See Also:
methodInvoker(FrameworkMethod, Object),TimeLimitedStatement
-
testName
protected String testName(org.junit.runners.model.FrameworkMethod method)
- Overrides:
testNamein classorg.junit.runners.BlockJUnit4ClassRunner
-
-