From 041cf00510a75042223d1857660fc7f1dff958ef Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 10 May 2020 19:21:39 +0530 Subject: 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 --- .../java/com/zeapo/pwdstore/PasswordEntryTest.kt | 16 ++++++++-------- .../java/com/zeapo/pwdstore/StrictDomainRegexTest.kt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'app/src/androidTest/java/com/zeapo') 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 -- cgit v1.2.3