android.test
Class ServiceTestCase<T extends android.app.Service>

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by android.test.AndroidTestCase
              extended by android.test.ServiceTestCase<T>
All Implemented Interfaces:
junit.framework.Test

public abstract class ServiceTestCase<T extends android.app.Service>
extends AndroidTestCase


Field Summary
 
Fields inherited from class android.test.AndroidTestCase
mContext
 
Constructor Summary
ServiceTestCase(Class<T> serviceClass)
           
 
Method Summary
protected  android.os.IBinder bindService(android.content.Intent intent)
           
 android.app.Application getApplication()
           
 T getService()
           
 android.content.Context getSystemContext()
           
 void setApplication(android.app.Application application)
           
protected  void setUp()
           
protected  void setupService()
           
protected  void shutdownService()
           
protected  void startService(android.content.Intent intent)
           
protected  void tearDown()
           
 void testServiceTestCaseSetUpProperly()
           
 
Methods inherited from class android.test.AndroidTestCase
assertActivityRequiresPermission, assertReadingContentUriRequiresPermission, assertWritingContentUriRequiresPermission, getContext, scrubClass, setContext, testAndroidTestCaseSetupProperly
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

ServiceTestCase

public ServiceTestCase(Class<T> serviceClass)
Method Detail

getService

public T getService()

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AndroidTestCase
Throws:
Exception

setupService

protected void setupService()

startService

protected void startService(android.content.Intent intent)

bindService

protected android.os.IBinder bindService(android.content.Intent intent)

shutdownService

protected void shutdownService()

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class AndroidTestCase
Throws:
Exception

setApplication

public void setApplication(android.app.Application application)

getApplication

public android.app.Application getApplication()

getSystemContext

public android.content.Context getSystemContext()

testServiceTestCaseSetUpProperly

public void testServiceTestCaseSetUpProperly()
                                      throws Exception
Throws:
Exception


Copyright © 2008-2012. All Rights Reserved.