Used more explicit variable names in tests

Change-Id: I2e0ebead70441eced05eb786aaa7683bfefa8976
pull/649/head
Adetunji Dahunsi 2 years ago
parent 337c940d66
commit f86d174c1b

@ -312,13 +312,15 @@ class OfflineFirstNewsRepositoryTest {
subject.syncWith(synchronizer) subject.syncWith(synchronizer)
val followedNewsResourcesFromNetwork = networkNewsResources
.filter { (it.topics intersect followedTopicIds).isNotEmpty() }
.map(NetworkNewsResource::id)
.sorted()
// Notifier should have been called with only news resources that have topics // Notifier should have been called with only news resources that have topics
// that the user follows // that the user follows
assertEquals( assertEquals(
expected = networkNewsResources expected = followedNewsResourcesFromNetwork,
.filter { (it.topics intersect followedTopicIds).isNotEmpty() }
.map(NetworkNewsResource::id)
.sorted(),
actual = notifier.addedNewsResources.first().map(NewsResource::id).sorted(), actual = notifier.addedNewsResources.first().map(NewsResource::id).sorted(),
) )
} }

Loading…
Cancel
Save