Book Image

Learning Android Application Testing

Book Image

Learning Android Application Testing

Overview of this book

Table of Contents (16 chapters)
Learning Android Application Testing
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The ServiceTestCase<T>


This is a test case specially created to test services. The methods to exercise the service life cycle, such as setupService, startService, bindService, and shutDownService, are also included in this class.

The constructor

There is only one public non-deprecated constructor for this class. This is as follows:

ServiceTestCase(Class<T> serviceClass)

It should be invoked with an instance of the Service class for the same Service used as a class template parameter.