I have a small application that interacts with a remote android service. I would like to mock this service in unit tests. I use Robolectric and JUnit for other test cases and shadows, but I could not figure out how to handle remote services.
Is it enough to create and run a test service using the same package with real services and export methods using the same aidl ?
Since I do not have code for this service, I assume that I cannot use Robolectric ShadowService , which requires an actual class.
Thank you very much.
java android robolectric
Anders T. Jun 09 '12 at 12:14 2012-06-09 12:14
source share