android.test
Class InstrumentationTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by android.test.InstrumentationTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ActivityTestCase, ProviderTestCase, SingleLaunchActivityTestCase, SyncBaseInstrumentation

public class InstrumentationTestCase
extends junit.framework.TestCase


Constructor Summary
InstrumentationTestCase()
           
 
Method Summary
 android.app.Instrumentation getInstrumentation()
           
 void injectInsrumentation(android.app.Instrumentation instrumentation)
           
 void injectInstrumentation(android.app.Instrumentation instrumentation)
           
<T extends android.app.Activity>
T
launchActivity(String pkg, Class<T> activityCls, android.os.Bundle extras)
           
<T extends android.app.Activity>
T
launchActivityWithIntent(String pkg, Class<T> activityCls, android.content.Intent intent)
           
protected  void runTest()
           
 void runTestOnUiThread(Runnable r)
           
 void sendKeys(int... keys)
           
 void sendKeys(String keysSequence)
           
 void sendRepeatedKeys(int... keys)
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, setUp, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstrumentationTestCase

public InstrumentationTestCase()
Method Detail

injectInstrumentation

public void injectInstrumentation(android.app.Instrumentation instrumentation)

injectInsrumentation

public void injectInsrumentation(android.app.Instrumentation instrumentation)

getInstrumentation

public android.app.Instrumentation getInstrumentation()

launchActivity

public final <T extends android.app.Activity> T launchActivity(String pkg,
                                                               Class<T> activityCls,
                                                               android.os.Bundle extras)

launchActivityWithIntent

public final <T extends android.app.Activity> T launchActivityWithIntent(String pkg,
                                                                         Class<T> activityCls,
                                                                         android.content.Intent intent)

runTestOnUiThread

public void runTestOnUiThread(Runnable r)
                       throws Throwable
Throws:
Throwable

runTest

protected void runTest()
                throws Throwable
Overrides:
runTest in class junit.framework.TestCase
Throws:
Throwable

sendKeys

public void sendKeys(String keysSequence)

sendKeys

public void sendKeys(int... keys)

sendRepeatedKeys

public void sendRepeatedKeys(int... keys)

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception


Copyright © 2008-2011. All Rights Reserved.