@ -88,10 +88,10 @@ class OfflineFirstNewsRepositoryTest {
fun offlineFirstNewsRepository _news _resources _stream _is _backed _by _news _resource _dao ( ) =
runTest {
assertEquals (
newsResourceDao . getNewsResources Stream ( )
newsResourceDao . getNewsResources ( )
. first ( )
. map ( PopulatedNewsResource :: asExternalModel ) ,
subject . getNewsResources Stream ( )
subject . getNewsResources ( )
. first ( )
)
}
@ -100,12 +100,12 @@ class OfflineFirstNewsRepositoryTest {
fun offlineFirstNewsRepository _news _resources _for _topic _is _backed _by _news _resource _dao ( ) =
runTest {
assertEquals (
newsResourceDao . getNewsResources Stream (
newsResourceDao . getNewsResources (
filterTopicIds = filteredInterestsIds ,
)
. first ( )
. map ( PopulatedNewsResource :: asExternalModel ) ,
subject . getNewsResources Stream (
subject . getNewsResources (
filterTopicIds = filteredInterestsIds ,
)
. first ( )
@ -113,7 +113,7 @@ class OfflineFirstNewsRepositoryTest {
assertEquals (
emptyList ( ) ,
subject . getNewsResources Stream (
subject . getNewsResources (
filterTopicIds = nonPresentInterestsIds ,
)
. first ( )
@ -124,12 +124,12 @@ class OfflineFirstNewsRepositoryTest {
fun offlineFirstNewsRepository _news _resources _for _author _is _backed _by _news _resource _dao ( ) =
runTest {
assertEquals (
newsResourceDao . getNewsResources Stream (
newsResourceDao . getNewsResources (
filterAuthorIds = filteredInterestsIds
)
. first ( )
. map ( PopulatedNewsResource :: asExternalModel ) ,
subject . getNewsResources Stream (
subject . getNewsResources (
filterAuthorIds = filteredInterestsIds
)
. first ( )
@ -137,7 +137,7 @@ class OfflineFirstNewsRepositoryTest {
assertEquals (
emptyList ( ) ,
subject . getNewsResources Stream (
subject . getNewsResources (
filterAuthorIds = nonPresentInterestsIds
)
. first ( )
@ -153,7 +153,7 @@ class OfflineFirstNewsRepositoryTest {
. map ( NetworkNewsResource :: asEntity )
. map ( NewsResourceEntity :: asExternalModel )
val newsResourcesFromDb = newsResourceDao . getNewsResources Stream ( )
val newsResourcesFromDb = newsResourceDao . getNewsResources ( )
. first ( )
. map ( PopulatedNewsResource :: asExternalModel )
@ -193,7 +193,7 @@ class OfflineFirstNewsRepositoryTest {
subject . syncWith ( synchronizer )
val newsResourcesFromDb = newsResourceDao . getNewsResources Stream ( )
val newsResourcesFromDb = newsResourceDao . getNewsResources ( )
. first ( )
. map ( PopulatedNewsResource :: asExternalModel )
@ -233,7 +233,7 @@ class OfflineFirstNewsRepositoryTest {
. map ( NewsResourceEntity :: asExternalModel )
. filter { it . id in changeListIds }
val newsResourcesFromDb = newsResourceDao . getNewsResources Stream ( )
val newsResourcesFromDb = newsResourceDao . getNewsResources ( )
. first ( )
. map ( PopulatedNewsResource :: asExternalModel )
@ -259,7 +259,7 @@ class OfflineFirstNewsRepositoryTest {
. map ( NetworkNewsResource :: topicEntityShells )
. flatten ( )
. distinctBy ( TopicEntity :: id ) ,
topicDao . getTopicEntities Stream ( )
topicDao . getTopicEntities ( )
. first ( )
)
}
@ -274,7 +274,7 @@ class OfflineFirstNewsRepositoryTest {
. map ( NetworkNewsResource :: authorEntityShells )
. flatten ( )
. distinctBy ( AuthorEntity :: id ) ,
authorDao . getAuthorEntities Stream ( )
authorDao . getAuthorEntities ( )
. first ( )
)
}