lundi 7 août 2017

How to use ActivityTestRule with ProviderTestCase2

I'm trying to test one method of an activity that inside it will insert some data in Content Provider as part of its logic. I want to do this in an isolated context in order to protected user data.

I know that is possible to use the class ProviderTestCase2 to isolate the Content Provider, but I don't know if is possible, and how, use it with the ActivityTestRule class in order to test the method how as it is.

How should be created this test case?

Thanks in advanced.

Aucun commentaire:

Enregistrer un commentaire