Skip to content

Commit d671126

Browse files
committed
Move @Suppress("ktlint:standard:max-line-length") to function scope
1 parent 2a2d8ed commit d671126

File tree

1 file changed

+38
-40
lines changed

1 file changed

+38
-40
lines changed

core/network/src/test/kotlin/com/google/samples/apps/nowinandroid/core/network/fake/FakeNiaNetworkDataSourceTest.kt

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -44,47 +44,45 @@ class FakeNiaNetworkDataSourceTest {
4444
)
4545
}
4646

47+
@Suppress("ktlint:standard:max-line-length")
4748
@Test
48-
fun testDeserializationOfTopics() =
49-
@Suppress("ktlint:standard:max-line-length")
50-
runTest(testDispatcher) {
51-
assertEquals(
52-
NetworkTopic(
53-
id = "1",
54-
name = "Headlines",
55-
shortDescription = "News you'll definitely be interested in",
56-
longDescription = "The latest events and announcements from the world of Android development.",
57-
url = "",
58-
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",
59-
),
60-
subject.getTopics().first(),
61-
)
62-
}
49+
fun testDeserializationOfTopics() = runTest(testDispatcher) {
50+
assertEquals(
51+
NetworkTopic(
52+
id = "1",
53+
name = "Headlines",
54+
shortDescription = "News you'll definitely be interested in",
55+
longDescription = "The latest events and announcements from the world of Android development.",
56+
url = "",
57+
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",
58+
),
59+
subject.getTopics().first(),
60+
)
61+
}
6362

63+
@Suppress("ktlint:standard:max-line-length")
6464
@Test
65-
fun testDeserializationOfNewsResources() =
66-
@Suppress("ktlint:standard:max-line-length")
67-
runTest(testDispatcher) {
68-
assertEquals(
69-
NetworkNewsResource(
70-
id = "125",
71-
title = "Android Basics with Compose",
72-
content = "We released the first two units of Android Basics with Compose, our first free course that teaches Android Development with Jetpack Compose to anyone; you do not need any prior programming experience other than basic computer literacy to get started. ",
73-
url = "https://android-developers.googleblog.com/2022/05/new-android-basics-with-compose-course.html",
74-
headerImageUrl = "https://developer.android.com/images/hero-assets/android-basics-compose.svg",
75-
publishDate = LocalDateTime(
76-
year = 2022,
77-
monthNumber = 5,
78-
dayOfMonth = 4,
79-
hour = 23,
80-
minute = 0,
81-
second = 0,
82-
nanosecond = 0,
83-
).toInstant(TimeZone.UTC),
84-
type = "Codelab",
85-
topics = listOf("2", "3", "10"),
86-
),
87-
subject.getNewsResources().find { it.id == "125" },
88-
)
89-
}
65+
fun testDeserializationOfNewsResources() = runTest(testDispatcher) {
66+
assertEquals(
67+
NetworkNewsResource(
68+
id = "125",
69+
title = "Android Basics with Compose",
70+
content = "We released the first two units of Android Basics with Compose, our first free course that teaches Android Development with Jetpack Compose to anyone; you do not need any prior programming experience other than basic computer literacy to get started. ",
71+
url = "https://android-developers.googleblog.com/2022/05/new-android-basics-with-compose-course.html",
72+
headerImageUrl = "https://developer.android.com/images/hero-assets/android-basics-compose.svg",
73+
publishDate = LocalDateTime(
74+
year = 2022,
75+
monthNumber = 5,
76+
dayOfMonth = 4,
77+
hour = 23,
78+
minute = 0,
79+
second = 0,
80+
nanosecond = 0,
81+
).toInstant(TimeZone.UTC),
82+
type = "Codelab",
83+
topics = listOf("2", "3", "10"),
84+
),
85+
subject.getNewsResources().find { it.id == "125" },
86+
)
87+
}
9088
}

0 commit comments

Comments
 (0)