Update OfflineFirstNewsRepositoryTest.kt

Improve the unit test to perform meaningful comparisons instead of merely comparing two empty lists.
pull/1799/head
EYH GPT 8 months ago committed by GitHub
parent 904e6fccee
commit 798b941b75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -89,6 +89,10 @@ class OfflineFirstNewsRepositoryTest {
@Test @Test
fun offlineFirstNewsRepository_news_resources_stream_is_backed_by_news_resource_dao() = fun offlineFirstNewsRepository_news_resources_stream_is_backed_by_news_resource_dao() =
testScope.runTest { testScope.runTest {
// After sync, newsResourceDao.getNewsResources().first() and
// subject.getNewsResources().first() will return non-empty lists.
subject.syncWith(synchronizer)
assertEquals( assertEquals(
newsResourceDao.getNewsResources() newsResourceDao.getNewsResources()
.first() .first()

Loading…
Cancel
Save