aboutsummaryrefslogtreecommitdiff
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.kt16
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt2
2 files changed, 9 insertions, 9 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.kt
index cdc822e5..5feb5aaf 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.kt
@@ -4,11 +4,11 @@
*/
package com.zeapo.pwdstore
+import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNull
import kotlin.test.assertTrue
-import org.junit.Test
class PasswordEntryTest {
@Test fun testGetPassword() {
@@ -39,13 +39,13 @@ class PasswordEntryTest {
assertEquals("username", PasswordEntry("\n${field.toUpperCase()} username").username)
}
assertEquals(
- "username",
- PasswordEntry("secret\nextra\nlogin: username\ncontent\n").username)
+ "username",
+ PasswordEntry("secret\nextra\nlogin: username\ncontent\n").username)
assertEquals(
- "username",
- PasswordEntry("\nextra\nusername: username\ncontent\n").username)
+ "username",
+ PasswordEntry("\nextra\nusername: username\ncontent\n").username)
assertEquals(
- "username", PasswordEntry("\nUSERNaMe: username\ncontent\n").username)
+ "username", PasswordEntry("\nUSERNaMe: username\ncontent\n").username)
assertEquals("username", PasswordEntry("\nlogin: username").username)
assertEquals("foo@example.com", PasswordEntry("\nemail: foo@example.com").username)
assertEquals("username", PasswordEntry("\nidentity: username\nlogin: another_username").username)
@@ -75,7 +75,7 @@ class PasswordEntryTest {
@Test fun testTotpUriInContent() {
val entry = PasswordEntry(
- "secret\nusername: test\notpauth://totp/test?secret=JBSWY3DPEHPK3PXP")
+ "secret\nusername: test\notpauth://totp/test?secret=JBSWY3DPEHPK3PXP")
assertTrue(entry.hasTotp())
assertEquals("JBSWY3DPEHPK3PXP", entry.totpSecret)
}
@@ -96,7 +96,7 @@ class PasswordEntryTest {
@Test fun testHotpUriInContent() {
val entry = PasswordEntry(
- "secret\nusername: test\notpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25")
+ "secret\nusername: test\notpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25")
assertTrue(entry.hasHotp())
assertEquals("JBSWY3DPEHPK3PXP", entry.hotpSecret)
assertEquals(25, entry.hotpCounter)
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
index 951ff0a1..1e2d4a6c 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
@@ -4,10 +4,10 @@
*/
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