Created
May 17, 2020 22:00
-
-
Save cdmunoz/ce2d3766d0288854a04659d4d25dd693 to your computer and use it in GitHub Desktop.
Place this class within main package structure, not androidTest packages
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
package co.cdmunoz.nasaroverphotos.utils.test | |
import androidx.test.espresso.idling.CountingIdlingResource | |
object EspressoIdlingResource { | |
private const val RESOURCE = "GLOBAL" | |
@JvmField | |
val countingIdlingResource = CountingIdlingResource(RESOURCE) | |
fun increment() = countingIdlingResource.increment() | |
fun decrement() { | |
if (!countingIdlingResource.isIdleNow) { | |
countingIdlingResource.decrement() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment