org.safs.android.engine
Class DActivityInstrumentTestCase

java.lang.Object
  extended by ActivityInstrumentationTestCase2
      extended by org.safs.android.engine.DActivityInstrumentTestCase

public class DActivityInstrumentTestCase
extends ActivityInstrumentationTestCase2

Robotium requires the use of an ActivityInstrumentationTestCase2 and not the InstrumentationTestRunner of the test package.

In a general-purpose framework like SAFS this may be all that this class ever does-- instantiate a working version of Robotium Solo.


Constructor Summary
DActivityInstrumentTestCase(java.lang.String targetPackage, java.lang.Class targetClass)
          Constructor for the class merely calling the superclass constructor.
 
Method Summary
 Solo getRobotium()
          Retrieve the Solo instance after it has been created.
 void setUp()
          Acquires the launch Activity with a call to getActivity() and then creates the Robotium Solo instance from that Activity.
 void tearDown()
          Currently, simply calls solo.finishOpenActivities()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DActivityInstrumentTestCase

public DActivityInstrumentTestCase(java.lang.String targetPackage,
                                   java.lang.Class targetClass)
Constructor for the class merely calling the superclass constructor. Prepares the instance with the targetPackage and launch Activity Class. These items are deduced elsewhere thru the Android PackageManager.

Parameters:
String - targetPackage
Class - targetClass
See Also:
ActivityInstrumentationTestCase2#ActivityInstrumentationTestCase2(String, Class)
Method Detail

setUp

public void setUp()
Acquires the launch Activity with a call to getActivity() and then creates the Robotium Solo instance from that Activity.

See Also:
#getActivity(), com.jayway.android.robotium.solo.Solo#Solo(Instrumentation, Activity)

getRobotium

public Solo getRobotium()
Retrieve the Solo instance after it has been created.

Returns:
Solo instance

tearDown

public void tearDown()
Currently, simply calls solo.finishOpenActivities()

See Also:
Solo#finishOpenedActivities()