Skip to content

Instantly share code, notes, and snippets.

@Pavneet-Sing
Created October 13, 2017 17:22
Show Gist options
  • Save Pavneet-Sing/a1b3de3ca03ea5b45819f9b6d1bbdfdf to your computer and use it in GitHub Desktop.
Save Pavneet-Sing/a1b3de3ca03ea5b45819f9b6d1bbdfdf to your computer and use it in GitHub Desktop.
Espresso idling resource for synchronize testing
public class EspressoTestingIdlingResource {
private static final String RESOURCE = "GLOBAL";
private static CountingIdlingResource mCountingIdlingResource =
new CountingIdlingResource(RESOURCE);
public static void increment() {
mCountingIdlingResource.increment();
}
public static void decrement() {
mCountingIdlingResource.decrement();
}
public static IdlingResource getIdlingResource() {
return mCountingIdlingResource;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment