Reputation: 1119
How to start/bind a service from a test case. I tried using the ServiceTestCase it doesnt work
Upvotes: 0
Views: 965
Reputation: 74790
From ServiceTestCase
documentation:
When one of your test methods calls
ServiceTestCase.startService()
orServiceTestCase.bindService()
, the test case callsService.onCreate()
and then calls eitherService.startService(Intent)
orService.bindService(Intent, ServiceConnection, int)
, as appropriate. It also stores values needed to track and support the lifecycle.
Upvotes: 2