Skip to content

Instantly share code, notes, and snippets.

@Kpeved
Created November 2, 2019 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kpeved/f510ed658c2b06894212dfe2a3194683 to your computer and use it in GitHub Desktop.
Save Kpeved/f510ed658c2b06894212dfe2a3194683 to your computer and use it in GitHub Desktop.
@Test
fun `get full contacts list`() {
allContactsRoboCursor.setResults(
arrayOf(
CONTACT_1_FULL,
CONTACT_2_FULL
)
)
phoneNumbersRoboCursor.setResults(
arrayOf(
PHONE_1_CONTACT_1
PHONE_2_CONTACT_1,
PHONE_2_CONTACT_2_OK
)
)
val testObserver = ContactsHelper(contentResolver).getAllContacts().test()
testObserver.assertValue { it.size == 2 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment