Restore test

This commit is contained in:
fabioCollini 2019-05-27 16:57:04 +02:00
parent b50c41a5f3
commit 4e3411ebf7

View file

@ -1,7 +1,5 @@
package com.nytimes.android.external.fs3
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.doAnswer
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import com.nytimes.android.external.store3.base.Fetcher
@ -19,13 +17,7 @@ import org.mockito.Mockito.times
import org.mockito.Mockito.verify
class StoreNetworkBeforeStaleFailTest {
private val fetcher: Fetcher<BufferedSource, BarCode> = mock{
runBlocking {
on(it.fetch(any())) doAnswer {
null
}
}
}
private val fetcher: Fetcher<BufferedSource, BarCode> = mock()
private val store = StoreBuilder.barcode<BufferedSource>()
.fetcher(fetcher)
.persister(TestPersister())