aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-07-14 11:31:37 +0530
committerGitHub <noreply@github.com>2020-07-14 11:31:37 +0530
commit7f3aceaf11ce69a121ea0d9bd62e38953184e40c (patch)
tree8a1053517e07f4ddef077804e57df7a4e7675507 /app/src/test/java
parent5d60f1304f5bf3ac8cc86880af6e68f45673ed8e (diff)
Fix navigation bar theming and reformat (#930)
Diffstat (limited to 'app/src/test/java')
-rw-r--r--app/src/test/java/com/zeapo/pwdstore/model/PasswordEntryTest.kt4
-rw-r--r--app/src/test/java/com/zeapo/pwdstore/utils/OtpTest.kt7
2 files changed, 9 insertions, 2 deletions
diff --git a/app/src/test/java/com/zeapo/pwdstore/model/PasswordEntryTest.kt b/app/src/test/java/com/zeapo/pwdstore/model/PasswordEntryTest.kt
index f31709df..16cbd855 100644
--- a/app/src/test/java/com/zeapo/pwdstore/model/PasswordEntryTest.kt
+++ b/app/src/test/java/com/zeapo/pwdstore/model/PasswordEntryTest.kt
@@ -6,15 +6,16 @@ package com.zeapo.pwdstore.model
import com.zeapo.pwdstore.utils.Otp
import com.zeapo.pwdstore.utils.TotpFinder
-import org.junit.Test
import java.util.Date
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
+import org.junit.Test
class PasswordEntryTest {
+
private fun makeEntry(content: String) = PasswordEntry(content, testFinder)
@Test fun testGetPassword() {
@@ -83,6 +84,7 @@ class PasswordEntryTest {
}
companion object {
+
const val TOTP_URI = "otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30"
// This implementation is hardcoded for the URI above.
diff --git a/app/src/test/java/com/zeapo/pwdstore/utils/OtpTest.kt b/app/src/test/java/com/zeapo/pwdstore/utils/OtpTest.kt
index 710b0845..6e6e7f21 100644
--- a/app/src/test/java/com/zeapo/pwdstore/utils/OtpTest.kt
+++ b/app/src/test/java/com/zeapo/pwdstore/utils/OtpTest.kt
@@ -1,9 +1,14 @@
+/*
+ * Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
package com.zeapo.pwdstore.utils
-import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
+import org.junit.Test
class OtpTest {