diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt (renamed from app/src/androidTest/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt) | 5 | ||||
-rw-r--r-- | app/src/test/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt (renamed from app/src/androidTest/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt) | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/src/androidTest/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt b/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt index b89cf0ef..f04913a1 100644 --- a/app/src/androidTest/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt +++ b/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt @@ -7,7 +7,12 @@ package dev.msfjarvis.aps.util.totp import kotlin.test.assertEquals import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [23]) class UriTotpFinderTest { private val totpFinder = UriTotpFinder() diff --git a/app/src/androidTest/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt b/app/src/test/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt index 575c5aa7..3d511132 100644 --- a/app/src/androidTest/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt +++ b/app/src/test/java/dev/msfjarvis/aps/util/viewmodel/StrictDomainRegexTest.kt @@ -8,10 +8,15 @@ import kotlin.test.assertFalse import kotlin.test.assertNull import kotlin.test.assertTrue import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config private infix fun String.matchedForDomain(domain: String) = SearchableRepositoryViewModel.generateStrictDomainRegex(domain)?.containsMatchIn(this) == true +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [23]) class StrictDomainRegexTest { @Test |