Skip to content

Instantly share code, notes, and snippets.

@catalinghita8
Created July 16, 2018 17:51
Show Gist options
  • Save catalinghita8/870d0b295380026585c163d7f636eeec to your computer and use it in GitHub Desktop.
Save catalinghita8/870d0b295380026585c163d7f636eeec to your computer and use it in GitHub Desktop.
/**
* Contains a static reference IdlingResource, and should be available only in a mock build type.
*/
public class EspressoIdlingResource {
private static final String RESOURCE = "GLOBAL";
private static SimpleCountingIdlingResource mCountingIdlingResource =
new SimpleCountingIdlingResource(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