summaryrefslogtreecommitdiff
path: root/app/src/androidTest
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-05-10 19:21:39 +0530
committerGitHub <noreply@github.com>2020-05-10 19:21:39 +0530
commit041cf00510a75042223d1857660fc7f1dff958ef (patch)
tree1b56e67e2b71afe23ac51b680b62ad778272f162 /app/src/androidTest
parent94dc92f8d70870b57a7f8c4fe8adef152c1211ce (diff)
Treewide codestyle cleanup (#765)
- Updated gitignore and checked in the IDE's codestyle config - Removed spotless as the underlying ktlint backend has failed to resolve the super frustrating import order bug[1] in nearly a year - Reformat the entire codebase based on the previously committed code style configuration. 1: https://github.com/pinterest/ktlint/issues/527
Diffstat (limited to 'app/src/androidTest')
-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