summaryrefslogtreecommitdiff
path: root/app/src/test/java
diff options
context:
space:
mode:
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 {