Created
January 24, 2020 02:45
-
-
Save cdmunoz/34c67bf2d44f855b7552d6ff02a60dd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyEspressoIdlingResourceRule: TestWatcher() { | |
private val idlingResource = EspressoIdlingResource.countingIdlingResource | |
override fun starting(description: Description?) { | |
IdlingRegistry.getInstance().register(idlingResource) | |
super.starting(description) | |
} | |
override fun finished(description: Description?) { | |
IdlingRegistry.getInstance().unregister(idlingResource) | |
super.starting(description) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment