Skip to content

Instantly share code, notes, and snippets.

@mohak1712
Created June 18, 2018 12:53
Show Gist options
  • Save mohak1712/97b0e68ff2b0b8b450c5c36e7f0ad86a to your computer and use it in GitHub Desktop.
Save mohak1712/97b0e68ff2b0b8b450c5c36e7f0ad86a to your computer and use it in GitHub Desktop.
@RunWith(AndroidJUnit4.class)
public class MainActivityTest {
@Rule
public ActivityTestRule<MainActivity> activityRule =
new ActivityTestRule<>(MainActivity.class,false,false);
private MockWebServer webServer;
@Before
public void setup() throws Exception {
webServer = new MockWebServer();
webServer.start(8080);
}
@After
public void tearDown() throws Exception {
webServer.shutdown();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment