chiuki / espresso-samples

A collection of samples demonstrating different Espresso techniques.
Apache License 2.0
635 stars 156 forks source link

ElapsedTimeIdlingResource no longer works with the new Espresso IdlingRegistry. #7

Closed mijiapps closed 7 years ago

mijiapps commented 7 years ago

The former Espresso.registerIdlingResources() method has been deprecated in favor of using the new IdlingRegistry via getInstance().register(). However, after upgrading, my test no longer work using the ElapsedTimeIdlingResource.

        mElapsedTimeIdlingResource = new ElapsedTimeIdlingResource(3);
        getInstance().register(mElapsedTimeIdlingResource);
       // Do Something
        getInstance().unregister(mElapsedTimeIdlingResource);
chiuki commented 7 years ago

I've updated the idling-resource-elapsed-time sample to register with IdlingRegistry.getInstance() and verified that the tests pass.