summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2024-09-03 23:53:36 +0200
committerJoel Klinghed <the_jk@spawned.biz>2024-09-03 23:53:36 +0200
commit9e44d7abadd091b2ad77e76ebede09d36febdfa8 (patch)
tree1ceca703024a2f3a1ef599ca14245aad8657733d
parentc6e7689f7c0354582edca55e08dd9531d666d936 (diff)
Remove robolectric from test-utils
Will make it possible to use TreeAbstractTest in androidTest as well as unittest
-rw-r--r--libs/local/src/test/java/org/the_jk/cleversync/local/LocalTreeTest.kt5
-rw-r--r--libs/test-utils/build.gradle.kts3
-rw-r--r--libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt5
3 files changed, 7 insertions, 6 deletions
diff --git a/libs/local/src/test/java/org/the_jk/cleversync/local/LocalTreeTest.kt b/libs/local/src/test/java/org/the_jk/cleversync/local/LocalTreeTest.kt
index e2d4264..3eba188 100644
--- a/libs/local/src/test/java/org/the_jk/cleversync/local/LocalTreeTest.kt
+++ b/libs/local/src/test/java/org/the_jk/cleversync/local/LocalTreeTest.kt
@@ -6,6 +6,7 @@ import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
+import org.robolectric.shadows.ShadowLooper
import org.the_jk.cleversync.TreeAbstractTest
@Config(manifest=Config.NONE)
@@ -20,4 +21,8 @@ class LocalTreeTest : TreeAbstractTest() {
}
override fun supportSymlinks() = true
+
+ override fun idle() {
+ ShadowLooper.idleMainLooper()
+ }
}
diff --git a/libs/test-utils/build.gradle.kts b/libs/test-utils/build.gradle.kts
index 1b796fa..5169d63 100644
--- a/libs/test-utils/build.gradle.kts
+++ b/libs/test-utils/build.gradle.kts
@@ -7,9 +7,8 @@ android {
}
dependencies {
- implementation(project(":libs:io"))
implementation(libs.junit)
- implementation(libs.robolectric)
implementation(libs.truth)
+ implementation(project(":libs:io"))
implementation(project(":libs:utils"))
}
diff --git a/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt b/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt
index b513503..2e234c0 100644
--- a/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt
+++ b/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt
@@ -4,7 +4,6 @@ import com.google.common.truth.Truth.assertThat
import org.junit.Assert
import org.junit.Assume
import org.junit.Test
-import org.robolectric.shadows.ShadowLooper
import org.the_jk.cleversync.io.Directory
import org.the_jk.cleversync.io.Link
import org.the_jk.cleversync.io.ModifiableLink
@@ -336,7 +335,5 @@ abstract class TreeAbstractTest {
protected abstract fun supportSymlinks(): Boolean
- protected open fun idle() {
- ShadowLooper.idleMainLooper()
- }
+ protected abstract fun idle()
}