Last active
September 16, 2015 14:29
-
-
Save brettwold/4f3817b35b410089268f to your computer and use it in GitHub Desktop.
Robolectric test for AlertDialog display
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 AlertTest { | |
@Test | |
public void check_alert() { | |
AlertDialog alert = ShadowAlertDialog.getLatestAlertDialog(); | |
assertNotNull(alert); | |
ShadowAlertDialog sAlert = Robolectric.shadowOf(alert); | |
assertThat(sAlert.getTitle().toString(), is(Robolectric.application.getString(R.string.adb_warning_title))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment