Home | History | Annotate | Download | only in test

Lines Matching refs:Service

20 import android.app.Service;
32 * This test case provides a framework in which you can test Service classes in
34 * Service, and hooks with which you can inject various dependencies and control
35 * the environment in which your Service is tested.
44 * A Service is accessed with a specific sequence of
47 * document. In order to support the lifecycle of a Service,
57 * The test case waits to call {@link android.app.Service#onCreate()} until one of your
60 * the running service.
65 * {@link android.app.Service#onCreate() Service.onCreate()} and then calls either
66 * {@link android.app.Service#startService(Intent) Service.startService(Intent)} or
67 * {@link android.app.Service#bindService(Intent, ServiceConnection, int)
68 * Service.bindService(Intent, ServiceConnection, int)}, as appropriate. It also stores
73 * method stops and destroys the service with the appropriate calls, depending on how the
74 * service was started. If you override <code>tearDown()</code>, your must call the
81 * A service has two inherent dependencies, its {@link android.content.Context Context} and its
99 public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase {
108 * @param serviceClass The type of the service under test.
123 * @return An instance of the service under test. This instance is created automatically when
147 * Creates the service under test and attaches all injected dependencies
165 null, // ActivityThread not actually used in Service
179 * Starts the service under test, in the same way as if it were started by
181 * an {@link android.content.Intent} that identifies a service.
182 * If you use this method to start the service, it is automatically stopped by
185 * @param intent An Intent that identifies a service, of the same form as the Intent passed to
205 * Starts the service under test, in the same way as if it were started by
208 * {@link android.content.Intent} that identifies a service.
216 * the service. The flag is assumed to be {@link android.content.Context#BIND_AUTO_CREATE}.
223 * Note: To be able to use bindService in a test, the service must implement getService()
231 * the service.
252 * Makes the necessary calls to stop (or unbind) the service under test, and
271 * Shuts down the service under test. Ensures all resources are cleaned up and
299 * @param application The Application object that is used by the service under test.
308 * Returns the Application object in use by the service under test.
320 * mock or other types of context objects for the service under test.
337 assertNotNull("service should be launched successfully", mService);