|
|
|
@ -45,9 +45,10 @@ class FakeNiaNetworkDataSourceTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun testDeserializationOfTopics() = runTest(testDispatcher) {
|
|
|
|
|
fun testDeserializationOfTopics() =
|
|
|
|
|
@Suppress("ktlint:standard:max-line-length")
|
|
|
|
|
runTest(testDispatcher) {
|
|
|
|
|
assertEquals(
|
|
|
|
|
/* ktlint-disable max-line-length */
|
|
|
|
|
NetworkTopic(
|
|
|
|
|
id = "1",
|
|
|
|
|
name = "Headlines",
|
|
|
|
@ -56,15 +57,15 @@ class FakeNiaNetworkDataSourceTest {
|
|
|
|
|
url = "",
|
|
|
|
|
imageUrl = "https://firebasestorage.googleapis.com/v0/b/now-in-android.appspot.com/o/img%2Fic_topic_Headlines.svg?alt=media&token=506faab0-617a-4668-9e63-4a2fb996603f",
|
|
|
|
|
),
|
|
|
|
|
/* ktlint-enable max-line-length */
|
|
|
|
|
subject.getTopics().first(),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun testDeserializationOfNewsResources() = runTest(testDispatcher) {
|
|
|
|
|
fun testDeserializationOfNewsResources() =
|
|
|
|
|
@Suppress("ktlint:standard:max-line-length")
|
|
|
|
|
runTest(testDispatcher) {
|
|
|
|
|
assertEquals(
|
|
|
|
|
/* ktlint-disable max-line-length */
|
|
|
|
|
NetworkNewsResource(
|
|
|
|
|
id = "125",
|
|
|
|
|
title = "Android Basics with Compose",
|
|
|
|
@ -83,7 +84,6 @@ class FakeNiaNetworkDataSourceTest {
|
|
|
|
|
type = "Codelab",
|
|
|
|
|
topics = listOf("2", "3", "10"),
|
|
|
|
|
),
|
|
|
|
|
/* ktlint-enable max-line-length */
|
|
|
|
|
subject.getNewsResources().find { it.id == "125" },
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|