From 7f3aceaf11ce69a121ea0d9bd62e38953184e40c Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 14 Jul 2020 11:31:37 +0530 Subject: Fix navigation bar theming and reformat (#930) --- app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt | 3 ++- .../java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt | 2 +- app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'app/src/androidTest') diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt index 1e2d4a6c..2631cb41 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt @@ -4,15 +4,16 @@ */ package com.zeapo.pwdstore -import org.junit.Test import kotlin.test.assertFalse import kotlin.test.assertNull import kotlin.test.assertTrue +import org.junit.Test private infix fun String.matchedForDomain(domain: String) = SearchableRepositoryViewModel.generateStrictDomainRegex(domain)?.containsMatchIn(this) == true class StrictDomainRegexTest { + @Test fun acceptsLiteralDomain() { assertTrue("work/example.org/john.doe@example.org.gpg" matchedForDomain "example.org") assertTrue("example.org/john.doe@example.org.gpg" matchedForDomain "example.org") diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt index 143cfe1b..2c2691b1 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt @@ -17,11 +17,11 @@ import androidx.test.rule.ActivityTestRule import com.google.android.material.button.MaterialButtonToggleGroup import com.zeapo.pwdstore.R import com.zeapo.pwdstore.git.BaseGitActivity.GitUpdateUrlResult +import kotlin.test.assertEquals import org.hamcrest.Matcher import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import kotlin.test.assertEquals @RunWith(AndroidJUnit4::class) class GitServerConfigActivityTest { diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt index 3397ed0d..8a836f89 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt @@ -5,8 +5,8 @@ package com.zeapo.pwdstore.utils -import org.junit.Test import kotlin.test.assertEquals +import org.junit.Test class UriTotpFinderTest { @@ -34,6 +34,7 @@ class UriTotpFinderTest { } companion object { + const val TOTP_URI = "otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25" } } -- cgit v1.2.3