From f02c6be10d8e79360c622603270e0ddb729b8718 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Mon, 19 Jul 2021 20:59:29 +0200 Subject: [PATCH] Fix format of some kotlin files so that it doesn't annoy people that are building this repo ;) --- .../playlist/LocalPlaylistManagerTest.kt | 20 +++++++------- .../testUtil/TrampolineSchedulerRule.kt | 26 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt b/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt index 9883105f3..211312bc0 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt +++ b/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt @@ -27,11 +27,11 @@ class LocalPlaylistManagerTest { @Before fun setup() { database = Room.inMemoryDatabaseBuilder( - ApplicationProvider.getApplicationContext(), - AppDatabase::class.java + ApplicationProvider.getApplicationContext(), + AppDatabase::class.java ) - .allowMainThreadQueries() - .build() + .allowMainThreadQueries() + .build() manager = LocalPlaylistManager(database) } @@ -44,8 +44,8 @@ class LocalPlaylistManagerTest { @Test fun createPlaylist() { val stream = StreamEntity( - serviceId = 1, url = "https://newpipe.net/", title = "title", - streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" + serviceId = 1, url = "https://newpipe.net/", title = "title", + streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" ) val result = manager.createPlaylist("name", listOf(stream)) @@ -68,13 +68,13 @@ class LocalPlaylistManagerTest { @Test() fun createPlaylist_nonExistentStreamsAreUpserted() { val stream = StreamEntity( - serviceId = 1, url = "https://newpipe.net/", title = "title", - streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" + serviceId = 1, url = "https://newpipe.net/", title = "title", + streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" ) database.streamDAO().insert(stream) val upserted = StreamEntity( - serviceId = 1, url = "https://newpipe.net/2", title = "title2", - streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" + serviceId = 1, url = "https://newpipe.net/2", title = "title2", + streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader" ) val result = manager.createPlaylist("name", listOf(stream, upserted)) diff --git a/app/src/androidTest/java/org/schabi/newpipe/testUtil/TrampolineSchedulerRule.kt b/app/src/androidTest/java/org/schabi/newpipe/testUtil/TrampolineSchedulerRule.kt index 8a12d2439..75f5c6195 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/testUtil/TrampolineSchedulerRule.kt +++ b/app/src/androidTest/java/org/schabi/newpipe/testUtil/TrampolineSchedulerRule.kt @@ -18,20 +18,20 @@ class TrampolineSchedulerRule : TestRule { private val scheduler = Schedulers.trampoline() override fun apply(base: Statement, description: Description): Statement = - object : Statement() { - override fun evaluate() { - try { - RxJavaPlugins.setComputationSchedulerHandler { scheduler } - RxJavaPlugins.setIoSchedulerHandler { scheduler } - RxJavaPlugins.setNewThreadSchedulerHandler { scheduler } - RxJavaPlugins.setSingleSchedulerHandler { scheduler } - RxAndroidPlugins.setInitMainThreadSchedulerHandler { scheduler } + object : Statement() { + override fun evaluate() { + try { + RxJavaPlugins.setComputationSchedulerHandler { scheduler } + RxJavaPlugins.setIoSchedulerHandler { scheduler } + RxJavaPlugins.setNewThreadSchedulerHandler { scheduler } + RxJavaPlugins.setSingleSchedulerHandler { scheduler } + RxAndroidPlugins.setInitMainThreadSchedulerHandler { scheduler } - base.evaluate() - } finally { - RxJavaPlugins.reset() - RxAndroidPlugins.reset() - } + base.evaluate() + } finally { + RxJavaPlugins.reset() + RxAndroidPlugins.reset() } } + } }