Created
January 24, 2020 02:36
-
-
Save cdmunoz/ffe51ece89880490ce62769169014ad5 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
@RunWith(AndroidJUnit4ClassRunner::class) | |
class MyUITestWithIdlingResourcesTest { | |
... //some variable def | |
@get:Rule | |
val activityRule = ActivityScenarioRule(MyMainActivity::class.java) | |
@Before | |
fun setup() { | |
//register idling resource | |
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource) | |
} | |
@After | |
fun close() { | |
//unregister idling resource | |
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource) | |
} | |
... //Tests | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment