ActivityInstrumentationTestCase2
, which provides more options for
configuring the Activity under test@Deprecated public abstract class ActivityInstrumentationTestCase<T extends Activity> extends ActivityTestCase
setUp()
and tearDown()
.
If you prefer an isolated unit test, see ActivityUnitTestCase
.
Constructor and Description |
---|
ActivityInstrumentationTestCase(String pkg,
Class<T> activityClass)
Deprecated.
Creates an
ActivityInstrumentationTestCase in non-touch mode. |
ActivityInstrumentationTestCase(String pkg,
Class<T> activityClass,
boolean initialTouchMode)
Deprecated.
Creates an
ActivityInstrumentationTestCase . |
Modifier and Type | Method and Description |
---|---|
T |
getActivity()
Deprecated.
|
protected void |
setUp()
Deprecated.
|
protected void |
tearDown()
Deprecated.
Make sure all resources are cleaned up and garbage collected before moving on to the next
test.
|
void |
testActivityTestCaseSetUpProperly()
Deprecated.
|
scrubClass, setActivity
getInstrumentation, injectInsrumentation, injectInstrumentation, launchActivity, launchActivityWithIntent, runTest, runTestOnUiThread, sendKeys, sendKeys, sendRepeatedKeys
public ActivityInstrumentationTestCase(String pkg, Class<T> activityClass)
ActivityInstrumentationTestCase
in non-touch mode.pkg
- ignored - no longer in use.activityClass
- The activity to test. This must be a class in the instrumentation
targetPackage specified in the AndroidManifest.xmlpublic ActivityInstrumentationTestCase(String pkg, Class<T> activityClass, boolean initialTouchMode)
ActivityInstrumentationTestCase
.pkg
- ignored - no longer in use.activityClass
- The activity to test. This must be a class in the instrumentation
targetPackage specified in the AndroidManifest.xmlinitialTouchMode
- true = in touch modepublic T getActivity()
getActivity
in class ActivityTestCase
protected void tearDown() throws Exception
InstrumentationTestCase
tearDown
in class InstrumentationTestCase
Exception