Created
June 2, 2017 03:02
-
-
Save nottyo/85cdc3b6c6b127405d3b6c440d11823e to your computer and use it in GitHub Desktop.
EspressoTestBase.java
This file contains 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
public class TestBase { | |
@Rule | |
public ActivityTestRule<LoadingActivity> mActivityTestRule = new ActivityTestRule<>(LoadingActivity.class); | |
protected Activity activity; | |
@Before | |
public void setUp(){ | |
mActivity = mActivityTestRule.getActivity(); | |
Espresso.registerIdlingResources(mActivityTestRule.getActivity().getCountingIdlingResource()); | |
} | |
@After | |
public void tearDown(){ | |
Espresso.unregisterIdlingResources(mActivityTestRule.getActivity().getCountingIdlingResource()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment