I have a small app that interacts with a remote android
service. I would like to mock that service in unit tests. I use Robolectric and JUnit
for other test cases and shadows but I could not figure how to deal with remote services.
Is it sufficient to create and start a test service using the same package with the real service and export methods using same aidl
?
Since I don't have the code for that service, I assume that I can not use Robolectric
's ShadowService which requires actual class to be there.
Thanks a lot.