Package org.robolectric
Class RobolectricTestParameterInjector
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.robolectric.internal.SandboxTestRunner
org.robolectric.RobolectricTestRunner
org.robolectric.RobolectricTestParameterInjector
- All Implemented Interfaces:
- org.junit.runner.Describable,- org.junit.runner.manipulation.Filterable,- org.junit.runner.manipulation.Orderable,- org.junit.runner.manipulation.Sortable
A 
RobolectricTestRunner that supports TestParameterInjector parameter injection.
 This runner provides several benefits over the ParameterizedRobolectricTestRunner, in
 particular:
 
- It provides convenient syntax for supporting field parameter injection.
- It allows parameterizing individual test methods using TestParameter.
- It provides easy to use declarative syntax for parameter combinations using TestParameters.
See https://github.com/google/TestParameterInjector for more details.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to allow sandboxed injected runner to be accessed from the helper runner.Nested classes/interfaces inherited from class org.robolectric.RobolectricTestRunnerRobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider, RobolectricTestRunner.HelperTestRunner, RobolectricTestRunner.RobolectricFrameworkMethod
- 
Field SummaryFields inherited from class org.robolectric.internal.SandboxTestRunnerclassHandlerBuilder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected InstrumentationConfigurationcreateClassLoaderConfig(org.junit.runners.model.FrameworkMethod method) Create anInstrumentationConfigurationsuitable for the providedFrameworkMethod.protected com.google.common.collect.ImmutableList<org.junit.runners.model.FrameworkMethod> protected RobolectricTestRunner.HelperTestRunnergetHelperTestRunner(Class<?> sandboxedTestClass) protected voidvalidateConstructor(List<Throwable> errors) protected voidvalidateTestMethods(List<Throwable> errors) Methods inherited from class org.robolectric.RobolectricTestRunnerafterTest, beforeTest, buildGlobalConfig, configureSandbox, createAndroidManifest, createClassHandler, createTest, defaultInjector, finallyAfterTest, findInterceptors, getBuildSystemApiProperties, getExtraShadows, getManifestFactory, getSandbox, getTestLifecycleClass, loadRunListeners, run, staticGetBuildSystemApiPropertiesMethods inherited from class org.robolectric.internal.SandboxTestRunnerafterClass, classBlock, getInterceptors, methodBlock, withPotentialTimeoutMethods inherited from class org.junit.runners.BlockJUnit4ClassRunnercollectInitializationErrors, computeTestMethods, createTest, describeChild, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor, withAfters, withBeforesMethods inherited from class org.junit.runners.ParentRunnerchildrenInvoker, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.RunnertestCount
- 
Constructor Details- 
RobolectricTestParameterInjectorpublic RobolectricTestParameterInjector(Class<?> testClass) throws org.junit.runners.model.InitializationError - Throws:
- org.junit.runners.model.InitializationError
 
 
- 
- 
Method Details- 
validateConstructor- Overrides:
- validateConstructorin class- org.junit.runners.BlockJUnit4ClassRunner
 
- 
validateTestMethods- Overrides:
- validateTestMethodsin class- org.junit.runners.BlockJUnit4ClassRunner
 
- 
createClassLoaderConfig@Nonnull protected InstrumentationConfiguration createClassLoaderConfig(org.junit.runners.model.FrameworkMethod method) Description copied from class:RobolectricTestRunnerCreate anInstrumentationConfigurationsuitable for the providedFrameworkMethod.Adds configuration for Android using AndroidConfigurer.Custom TestRunner subclasses may wish to override this method to provide additional configuration. - Overrides:
- createClassLoaderConfigin class- RobolectricTestRunner
- Parameters:
- method- the test method that's about to run
- Returns:
- an InstrumentationConfiguration
 
- 
getChildrenprotected com.google.common.collect.ImmutableList<org.junit.runners.model.FrameworkMethod> getChildren()- Overrides:
- getChildrenin class- RobolectricTestRunner
 
- 
getHelperTestRunnerprotected RobolectricTestRunner.HelperTestRunner getHelperTestRunner(Class<?> sandboxedTestClass) throws org.junit.runners.model.InitializationError - Overrides:
- getHelperTestRunnerin class- RobolectricTestRunner
- Throws:
- org.junit.runners.model.InitializationError
 
 
-