Skip to content

Commit b651b2e

Browse files
authored
Update OfflineFirstTopicsRepositoryTest.kt
Improve the unit test to do meaning comparisons instead of just comparing two empty lists.
1 parent b89e331 commit b651b2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/data/src/test/kotlin/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstTopicsRepositoryTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ class OfflineFirstTopicsRepositoryTest {
6767
@Test
6868
fun offlineFirstTopicsRepository_topics_stream_is_backed_by_topics_dao() =
6969
testScope.runTest {
70+
// After sync, topicDao.getTopicEntities().first() and subject.getTopics().first()
71+
// will return non-empty lists.
72+
subject.syncWith(synchronizer)
73+
7074
assertEquals(
7175
topicDao.getTopicEntities()
7276
.first()

0 commit comments

Comments
 (0)