Created
April 11, 2017 07:37
-
-
Save ecgreb/618f33bcf00bb34b6d8736a5f8dca6bf to your computer and use it in GitHub Desktop.
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 LoginActivityTest { | |
@Rule public ActivityTestRule<LoginActivity> activityRule = | |
new ActivityTestRule(LoginActivity.class); | |
@Test public void useAppContext() throws Exception { | |
Context appContext = InstrumentationRegistry.getTargetContext(); | |
assertEquals("com.example.ecgreb.mvpc", appContext.getPackageName()); | |
} | |
@Test public void onLoginFormClick_shouldDisplayProgressView() throws Exception { | |
onView(withId(R.id.login_form)).perform(click()); | |
onView(withId(R.id.login_progress)).check(matches(isDisplayed())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment