Created
August 4, 2016 16:50
-
-
Save heitorcolangelo/b5b88d44c981d1d58d8575552eb36009 to your computer and use it in GitHub Desktop.
MainActivityTest - configuring MockWebServer
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
@RunWith(AndroidJUnit4.class) | |
public class MainActivityTest { | |
private MockWebServer server; | |
@Rule | |
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false); | |
@Before | |
public void setUp() throws Exception { | |
server = new MockWebServer(); | |
server.start(); | |
} | |
@After | |
public void tearDown() throws IOException { | |
server.shutdown(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
its pretty cool