FileDocCategorySizeDatePackage
InstrumentationTestSuite.javaAPI DocAndroid 1.5 API2177Wed May 06 22:41:56 BST 2009android.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).injectInsrumentation(mInstrumentation);
        }

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