FileDocCategorySizeDatePackage
InstrumentationTestSuite.javaAPI DocAndroid 5.1 API2178Thu Mar 12 22:22:10 GMT 2015android.test

InstrumentationTestSuite

public class InstrumentationTestSuite extends TestSuite
A {@link junit.framework.TestSuite} that injects {@link android.app.Instrumentation} into {@link InstrumentationTestCase} before running them.

Fields Summary
private final android.app.Instrumentation
mInstrumentation
Constructors Summary
public InstrumentationTestSuite(android.app.Instrumentation instr)

param
instr The instrumentation that will be injected into each test before running it.

        mInstrumentation = instr;
    
public InstrumentationTestSuite(String name, android.app.Instrumentation instr)

        super(name);
        mInstrumentation = instr;
    
public InstrumentationTestSuite(Class theClass, android.app.Instrumentation instr)

param
theClass Inspected for methods starting with 'test'
param
instr The instrumentation to inject into each test before running.

        super(theClass);
        mInstrumentation = instr;
    
Methods Summary
public voidaddTestSuite(java.lang.Class testClass)

        addTest(new InstrumentationTestSuite(testClass, mInstrumentation));
    
public voidrunTest(junit.framework.Test test, junit.framework.TestResult result)


        if (test instanceof InstrumentationTestCase) {
            ((InstrumentationTestCase) test).injectInstrumentation(mInstrumentation);
        }

        // run the test as usual
        super.runTest(test, result);