IT. Expert System.

Android Reference

ActivityUnitTestCase


android.test

Class ActivityUnitTestCase<T extends Activity>

    • Constructor Detail

      • ActivityUnitTestCase

        public ActivityUnitTestCase(Class<T> activityClass)
    • Method Detail

      • startActivity

        protected T startActivity(Intent intent,
                      Bundle savedInstanceState,
                      Object lastNonConfigurationInstance)
        Start the activity under test, in the same way as if it was started by Context.startActivity(), providing the arguments it supplied. When you use this method to start the activity, it will automatically be stopped by tearDown().

        This method will call onCreate(), but if you wish to further exercise Activity life cycle methods, you must call them yourself from your test case.

        Do not call from your setUp() method. You must call this method from each of your test methods.

        Parameters:
        intent - The Intent as if supplied to Context.startActivity(android.content.Intent).
        savedInstanceState - The instance state, if you are simulating this part of the life cycle. Typically null.
        lastNonConfigurationInstance - This Object will be available to the Activity if it calls Activity.getLastNonConfigurationInstance(). Typically null.
        Returns:
        Returns the Activity that was created
      • tearDown

        protected void tearDown()
                         throws Exception
        Description copied from class: InstrumentationTestCase
        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.
        Overrides:
        tearDown in class InstrumentationTestCase
        Throws:
        Exception
      • getStartedActivityRequest

        public int getStartedActivityRequest()
        This method will return the launch request code if your Activity under test calls Activity.startActivityForResult(Intent, int).
        Returns:
        The request code provided in the start call, or -1 if no start call was made.
      • getFinishedActivityRequest

        public int getFinishedActivityRequest()
        This method will return the request code if the Activity under test called Activity.finishActivity(int).
        Returns:
        The request code provided in the start call, or -1 if no finish call was made.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1696 / 96490195. Delta: 0.04046 с