Skip to content

Commit

Permalink
Adds some extra check to the GenreRepository test
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Jan 31, 2017
1 parent aca5f7e commit ad588c8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ class GenreRepositoryImplTest {
@Test
fun getAndSaveRemote() {
val repository = scope.getInstance(GenreRepository::class.java)
val isEmptySubscriber = TestSubscriber<Boolean>()

repository.cacheIsEmpty().subscribe(isEmptySubscriber)
isEmptySubscriber.awaitTerminalEvent()
isEmptySubscriber.assertCompleted()
isEmptySubscriber.assertNoErrors()
isEmptySubscriber.assertValueCount(1)
isEmptySubscriber.assertValue(true)

val testSubscriber = TestSubscriber<FlowCursorList<Genre>>()
repository.getAndSaveRemote().subscribe(testSubscriber)

Expand Down

0 comments on commit ad588c8

Please sign in to comment.