Created
November 25, 2019 14:40
-
-
Save nongdenchet/a53aa0d962991a4f6dd243ca50bba818 to your computer and use it in GitHub Desktop.
RemyndDetailsFragmentTest#testCreateNewRemind
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
@Test | |
fun testCreateNewRemind() { | |
mockData() | |
launchFragmentInContainer<RemyndDetailsFragment>( | |
factory = factory, | |
themeResId = R.style.AppTheme | |
) | |
onView(withId(R.id.edtTitle)).perform( | |
typeText("Go to school"), | |
closeSoftKeyboard() | |
) | |
onView(withId(R.id.tvSave)).perform(click()) | |
runBlocking { | |
val entity = remyndDao.get(2)!! | |
assertEquals("Go to school", entity.content) | |
assertTrue(entity.active) | |
verify(scheduler, times(1)).schedule( | |
Alarm( | |
id = 2, | |
content = "Go to school", | |
triggerAt = entity.triggerAt, | |
vibrate = false, | |
interval = null | |
) | |
) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment