aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/androidTest/java/com/zeapo/pwdstore/utils
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-12-05 06:07:18 +0530
committerGitHub <noreply@github.com>2020-12-05 06:07:18 +0530
commit5e66d99c852ea67a88b650c03b0e8d55e83eccde (patch)
treeaee323a08253fe7b863976eff92a1bd412bd1430 /app/src/androidTest/java/com/zeapo/pwdstore/utils
parent8eb55f18a11d6b2f155c7c9d48ca833313ee13db (diff)
downloadHardenedPass-5e66d99c852ea67a88b650c03b0e8d55e83eccde.tar.gz
HardenedPass-5e66d99c852ea67a88b650c03b0e8d55e83eccde.zip
Refactor package structure (#1233)
* idea: default test runner to Gradle * Kick off package structure revamp * Reparent all classes under dev.msfjarvis.aps Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/androidTest/java/com/zeapo/pwdstore/utils')
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt45
1 files changed, 0 insertions, 45 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt
deleted file mode 100644
index 0e4ac51c..00000000
--- a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-package com.zeapo.pwdstore.utils
-
-import kotlin.test.assertEquals
-import org.junit.Test
-
-class UriTotpFinderTest {
-
- private val totpFinder = UriTotpFinder()
-
- @Test
- fun findSecret() {
- assertEquals("HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ", totpFinder.findSecret(TOTP_URI))
- assertEquals("HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ", totpFinder.findSecret("name\npassword\ntotp: HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ"))
- assertEquals("HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ", totpFinder.findSecret(PASS_FILE_CONTENT))
- }
-
- @Test
- fun findDigits() {
- assertEquals("12", totpFinder.findDigits(TOTP_URI))
- assertEquals("12", totpFinder.findDigits(PASS_FILE_CONTENT))
- }
-
- @Test
- fun findPeriod() {
- assertEquals(25, totpFinder.findPeriod(TOTP_URI))
- assertEquals(25, totpFinder.findPeriod(PASS_FILE_CONTENT))
- }
-
- @Test
- fun findAlgorithm() {
- assertEquals("SHA256", totpFinder.findAlgorithm(TOTP_URI))
- assertEquals("SHA256", totpFinder.findAlgorithm(PASS_FILE_CONTENT))
- }
-
- companion object {
-
- const val TOTP_URI = "otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25"
- const val PASS_FILE_CONTENT = "password\n$TOTP_URI"
- }
-}