Last active
November 9, 2016 13:26
-
-
Save rafaeltoledo/37635b4466041022ba01 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(RobolectricTestRunner.class) | |
@Config(constants = BuildConfig.class, sdk = 22) | |
public class MainActivityTest { | |
@Test | |
public void shouldHideButtonAfterClick() { | |
MainActivity activity = Robolectric.setupActivity(MainActivity.class); | |
Button button = (Button) activity.findViewById(R.id.hide); | |
button.performClick(); | |
assertThat(button.getVisibility(), is(View.GONE)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment