Last active
August 20, 2018 12:43
-
-
Save phellipealexandre/ebb871fd7ad78aa5cef17b7f05eb9b6c to your computer and use it in GitHub Desktop.
Robolectric instrumentation test in Kotlin
This file contains hidden or 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) | |
class OnDeviceTest { | |
@get:Rule val rule = ActivityTestRule(NoteListActivity::class.java) | |
@Test fun clickingOnTitle_shouldLaunchEditAction() { | |
onView(withId(R.id.button)).perform(click()) | |
intended(hasAction(equalTo("android.intent.action.EDIT"))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment