java.lang.Object | ||||
↳ | junit.framework.Assert | |||
↳ | junit.framework.TestCase | |||
↳ | android.test.InstrumentationTestCase | |||
↳ | android.test.SingleLaunchActivityTestCase<T extends android.app.Activity> |
If you would like to test a single activity with an
InstrumentationTestCase
, this provides some of the boiler plate to
launch and finish the activity in setUp()
and tearDown()
.
This launches the activity only once for the entire class instead of doing it
in every setup / teardown call.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NOTE: The parameter pkg must refer to the package identifier of the
package hosting the activity to be launched, which is specified in the AndroidManifest.xml
file.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets up the fixture, for example, open a network connection.
| |||||||||||
Make sure all resources are cleaned up and garbage collected before moving on to the next
test.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.test.InstrumentationTestCase
| |||||||||||
From class
junit.framework.TestCase
| |||||||||||
From class
junit.framework.Assert
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
junit.framework.Test
|
NOTE: The parameter pkg must refer to the package identifier of the package hosting the activity to be launched, which is specified in the AndroidManifest.xml file. This is not necessarily the same as the java package name.
pkg | The package hosting the activity to be launched. |
---|---|
activityClass | The activity to test. |
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.
Exception |
---|
Make sure all resources are cleaned up and garbage collected before moving on to the next test. Subclasses that override this method should make sure they call super.tearDown() at the end of the overriding method.
Exception |
---|