|
|
|
@ -64,14 +64,14 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Instantiate_repository() {
|
|
|
|
|
fun instantiate_repository() {
|
|
|
|
|
initializeRepository()
|
|
|
|
|
|
|
|
|
|
coVerify(exactly = 1) { api.version() }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Instantiate_repository_without_api_version() {
|
|
|
|
|
fun instantiate_repository_without_api_version() {
|
|
|
|
|
every { appSettingsService.getApiVersion() } returns -1
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
@ -81,7 +81,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_api_4_date_with_api_1_version_stored() {
|
|
|
|
|
fun get_api_4_date_with_api_1_version_stored() {
|
|
|
|
|
every { appSettingsService.getApiVersion() } returns 1
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
@ -97,7 +97,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_api_1_date_with_api_4_version_stored() {
|
|
|
|
|
fun get_api_1_date_with_api_4_version_stored() {
|
|
|
|
|
every { appSettingsService.getApiVersion() } returns 4
|
|
|
|
|
coEvery { api.version() } returns SelfossModel.StatusAndData(success = false, null)
|
|
|
|
|
val itemParameters = FakeItemParameters()
|
|
|
|
@ -117,7 +117,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_newer_items() {
|
|
|
|
|
fun get_newer_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -132,7 +132,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_all_newer_items() {
|
|
|
|
|
fun get_all_newer_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -148,7 +148,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_newer_starred_items() {
|
|
|
|
|
fun get_newer_starred_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -164,7 +164,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_newer_items_without_connectivity() {
|
|
|
|
|
fun get_newer_items_without_connectivity() {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
@ -178,7 +178,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_newer_items_without_connectivity_and_tag_filter() {
|
|
|
|
|
fun get_newer_items_without_connectivity_and_tag_filter() {
|
|
|
|
|
val itemParameter1 = FakeItemParameters()
|
|
|
|
|
val itemParameter2 = FakeItemParameters()
|
|
|
|
|
val itemParameter3 = FakeItemParameters()
|
|
|
|
@ -206,7 +206,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_newer_items_without_connectivity_and_source_filter() {
|
|
|
|
|
fun get_newer_items_without_connectivity_and_source_filter() {
|
|
|
|
|
val itemParameter1 = FakeItemParameters()
|
|
|
|
|
val itemParameter2 = FakeItemParameters()
|
|
|
|
|
val itemParameter3 = FakeItemParameters()
|
|
|
|
@ -241,7 +241,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_older_items() {
|
|
|
|
|
fun get_older_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -257,7 +257,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_all_older_items() {
|
|
|
|
|
fun get_all_older_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -274,7 +274,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_older_starred_items() {
|
|
|
|
|
fun get_older_starred_items() {
|
|
|
|
|
coEvery { api.getItems(any(), any(), any(), any(), any(), any(), any()) } returns
|
|
|
|
|
SelfossModel.StatusAndData(success = true, data = generateTestApiItem())
|
|
|
|
|
|
|
|
|
@ -291,8 +291,8 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Reload_badges() {
|
|
|
|
|
var success = false
|
|
|
|
|
fun reload_badges() {
|
|
|
|
|
var success: Boolean
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
runBlocking {
|
|
|
|
@ -308,10 +308,10 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Reload_badges_without_response() {
|
|
|
|
|
fun reload_badges_without_response() {
|
|
|
|
|
coEvery { api.stats() } returns SelfossModel.StatusAndData(success = false, data = null)
|
|
|
|
|
|
|
|
|
|
var success = false
|
|
|
|
|
var success: Boolean
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
runBlocking {
|
|
|
|
@ -327,11 +327,11 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Reload_badges_without_connection() {
|
|
|
|
|
fun reload_badges_without_connection() {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
every { db.itemsQueries.items().executeAsList() } returns generateTestDBItems()
|
|
|
|
|
|
|
|
|
|
var success = false
|
|
|
|
|
var success: Boolean
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
runBlocking {
|
|
|
|
@ -347,11 +347,11 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Reload_badges_without_connection_and_items_caching_disabled() {
|
|
|
|
|
fun reload_badges_without_connection_and_items_caching_disabled() {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns false
|
|
|
|
|
every { appSettingsService.isUpdateSourcesEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
var success = false
|
|
|
|
|
var success: Boolean
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
runBlocking {
|
|
|
|
@ -367,7 +367,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags() {
|
|
|
|
|
fun get_tags() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -383,7 +383,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>? = null
|
|
|
|
|
var testTags: List<SelfossModel.Tag>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -394,7 +394,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_with_sources_update_disabled() {
|
|
|
|
|
fun get_tags_with_sources_update_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -410,7 +410,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
// Tags will be fetched from the database on the second call, thus testTags != tags
|
|
|
|
@ -424,7 +424,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_with_items_caching_disabled() {
|
|
|
|
|
fun get_tags_with_items_caching_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -440,7 +440,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns false
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -451,7 +451,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_with_sources_update_and_items_caching_disabled() {
|
|
|
|
|
fun get_tags_with_sources_update_and_items_caching_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -467,7 +467,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns false
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
@ -480,7 +480,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_without_connection() {
|
|
|
|
|
fun get_tags_without_connection() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -496,7 +496,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -508,7 +508,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_without_connection_and_items_caching_disabled() {
|
|
|
|
|
fun get_tags_without_connection_and_items_caching_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -524,7 +524,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isUpdateSourcesEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -535,7 +535,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_without_connection_and_sources_update_disabled() {
|
|
|
|
|
fun get_tags_without_connection_and_sources_update_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -551,7 +551,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns true
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -563,7 +563,7 @@ class RepositoryTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun Get_tags_without_connection_and_sources_update_and_items_caching_disabled() {
|
|
|
|
|
fun get_tags_without_connection_and_sources_update_and_items_caching_disabled() {
|
|
|
|
|
val tags = listOf(
|
|
|
|
|
SelfossModel.Tag("test", "red", 6),
|
|
|
|
|
SelfossModel.Tag("second", "yellow", 0)
|
|
|
|
@ -579,7 +579,7 @@ class RepositoryTest {
|
|
|
|
|
every { appSettingsService.isItemCachingEnabled() } returns false
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testTags: List<SelfossModel.Tag> = emptyList()
|
|
|
|
|
var testTags: List<SelfossModel.Tag>
|
|
|
|
|
runBlocking {
|
|
|
|
|
testTags = repository.getTags()
|
|
|
|
|
}
|
|
|
|
@ -631,7 +631,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -685,7 +685,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
// Sources will be fetched from the database on the second call, thus testSources != sources
|
|
|
|
@ -742,7 +742,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -796,7 +796,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -848,7 +848,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -902,7 +902,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -956,7 +956,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -1010,7 +1010,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.sources() } returns SelfossModel.StatusAndData(success = true, data = sources)
|
|
|
|
|
every { db.sourcesQueries.sources().executeAsList() } returns sourcesDB
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var testSources: List<SelfossModel.Source>? = null
|
|
|
|
|
var testSources: List<SelfossModel.Source>?
|
|
|
|
|
runBlocking {
|
|
|
|
|
testSources = repository.getSources()
|
|
|
|
|
}
|
|
|
|
@ -1026,7 +1026,7 @@ class RepositoryTest {
|
|
|
|
|
SelfossModel.SuccessResponse(true)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.createSource(
|
|
|
|
|
"test",
|
|
|
|
@ -1056,7 +1056,7 @@ class RepositoryTest {
|
|
|
|
|
SelfossModel.SuccessResponse(false)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.createSource(
|
|
|
|
|
"test",
|
|
|
|
@ -1086,7 +1086,7 @@ class RepositoryTest {
|
|
|
|
|
SelfossModel.SuccessResponse(true)
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.createSource(
|
|
|
|
|
"test",
|
|
|
|
@ -1115,7 +1115,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.deleteSource(any()) } returns SelfossModel.SuccessResponse(true)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.deleteSource(5)
|
|
|
|
|
}
|
|
|
|
@ -1129,7 +1129,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.deleteSource(any()) } returns SelfossModel.SuccessResponse(false)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.deleteSource(5)
|
|
|
|
|
}
|
|
|
|
@ -1143,7 +1143,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.deleteSource(any()) } returns SelfossModel.SuccessResponse(false)
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.deleteSource(5)
|
|
|
|
|
}
|
|
|
|
@ -1160,7 +1160,7 @@ class RepositoryTest {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.updateRemote()
|
|
|
|
|
}
|
|
|
|
@ -1177,7 +1177,7 @@ class RepositoryTest {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.updateRemote()
|
|
|
|
|
}
|
|
|
|
@ -1194,7 +1194,7 @@ class RepositoryTest {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.updateRemote()
|
|
|
|
|
}
|
|
|
|
@ -1211,7 +1211,7 @@ class RepositoryTest {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.updateRemote()
|
|
|
|
|
}
|
|
|
|
@ -1225,7 +1225,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.login() } returns SelfossModel.SuccessResponse(success = true)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.login()
|
|
|
|
|
}
|
|
|
|
@ -1239,7 +1239,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.login() } returns SelfossModel.SuccessResponse(success = false)
|
|
|
|
|
|
|
|
|
|
initializeRepository()
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.login()
|
|
|
|
|
}
|
|
|
|
@ -1253,7 +1253,7 @@ class RepositoryTest {
|
|
|
|
|
coEvery { api.login() } returns SelfossModel.SuccessResponse(success = true)
|
|
|
|
|
|
|
|
|
|
initializeRepository(MutableStateFlow(false))
|
|
|
|
|
var response = false
|
|
|
|
|
var response: Boolean
|
|
|
|
|
runBlocking {
|
|
|
|
|
response = repository.login()
|
|
|
|
|
}
|
|
|
|
|