You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/mapper/KotlinWeeklyEntryMapper.kt
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,17 @@ import java.time.ZonedDateTime
6
6
importjava.time.format.DateTimeFormatter
7
7
8
8
fun KotlinWeeklyItem.toKotlinWeeklyEntry(): KotlinWeekly {
9
+
val issueNumber = linkIssueNumberRegex.find(link)?.groupValues?.get(1)?.toInt()
Copy file name to clipboardExpand all lines: src/test/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/mapper/KotlinWeeklyEntryMapperTest.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,12 @@ class KotlinWeeklyEntryMapperTest {
28
28
}
29
29
30
30
@Test
31
-
fun`toKotlinWeeklyEntry() throws exception when issueNumber not found in title`() {
31
+
fun`toKotlinWeeklyEntry() throws exception when issueNumber not found in link`() {
32
32
assertFailsWith<IllegalStateException> {
33
33
KotlinWeeklyItem(
34
34
title ="Kotlin Weekly X",
35
-
link ="https://mailchi.mp/kotlinweekly/kotlin-weekly-381",
0 commit comments