Skip to content

Commit 67e4bd7

Browse files
committed
Extract syncmanager creation from try-catch
Signed-off-by: Sunik Kupfer <[email protected]>
1 parent 4357545 commit 67e4bd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: app/src/androidTest/kotlin/at/bitfire/davdroid/sync/JtxSyncManagerTest.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class JtxSyncManagerTest {
8484

8585
@Test
8686
fun testProcessICalObject_recurrenceIdWithoutDtStart() {
87+
val syncManager = syncManager()
8788
val reader = StringReader(
8889
"BEGIN:VCALENDAR\n" +
8990
"BEGIN:VTODO\n" +
@@ -92,7 +93,7 @@ class JtxSyncManagerTest {
9293
"END:VTODO\n" +
9394
"END:VCALENDAR")
9495
try {
95-
syncManager().processICalObject("demo-calendar", "abc123", reader)
96+
syncManager.processICalObject("demo-calendar", "abc123", reader)
9697
} catch (e: Exception) {
9798
// Fail on NPE, allow all other exceptions
9899
if (e is NullPointerException)

0 commit comments

Comments
 (0)