MockService


public class MockService
extends Object

java.lang.Object
   ↳ android.test.mock.MockService


This class is deprecated.
Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.

A mock Service class.

Provided for use by android.test.ServiceTestCase.

Summary

Public methods

static <T extends Service> void attachForTesting(Service service, Context context, String serviceClassName, Application application)

Inherited methods

Public methods

attachForTesting

public static void attachForTesting (Service service, 
                Context context, 
                String serviceClassName, 
                Application application)

Parameters
service Service

context Context

serviceClassName String

application Application