aboutsummaryrefslogtreecommitdiffstats
path: root/format-common/src/test/kotlin/dev/msfjarvis/aps/data
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-05-03 01:48:16 +0530
committerGitHub <noreply@github.com>2022-05-02 20:18:16 +0000
commitc555609f164eb5245eb1cceb3fe22ec1d258ec5d (patch)
tree2a3dd02158fccfff2d92fe9c3ff433758a141076 /format-common/src/test/kotlin/dev/msfjarvis/aps/data
parent07a83a33b878791257d1aa2282e71c1d2f301254 (diff)
downloadHardenedPass-c555609f164eb5245eb1cceb3fe22ec1d258ec5d.tar.gz
HardenedPass-c555609f164eb5245eb1cceb3fe22ec1d258ec5d.zip
Misc cleanups (#1891)
Diffstat (limited to 'format-common/src/test/kotlin/dev/msfjarvis/aps/data')
-rw-r--r--format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt16
1 files changed, 8 insertions, 8 deletions
diff --git a/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt b/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt
index 201eb611..27fbe0e2 100644
--- a/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt
+++ b/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt
@@ -34,7 +34,7 @@ class PasswordEntryTest {
)
@Test
- fun testGetPassword() {
+ fun getPassword() {
assertEquals("fooooo", makeEntry("fooooo\nbla\n").password)
assertEquals("fooooo", makeEntry("fooooo\nbla").password)
assertEquals("fooooo", makeEntry("fooooo\n").password)
@@ -52,7 +52,7 @@ class PasswordEntryTest {
}
@Test
- fun testGetExtraContent() {
+ fun getExtraContent() {
assertEquals("bla\n", makeEntry("fooooo\nbla\n").extraContentString)
assertEquals("bla", makeEntry("fooooo\nbla").extraContentString)
assertEquals("", makeEntry("fooooo\n").extraContentString)
@@ -103,7 +103,7 @@ class PasswordEntryTest {
}
@Test
- fun testGetUsername() {
+ fun getUsername() {
for (field in PasswordEntry.USERNAME_FIELDS) {
assertEquals("username", makeEntry("\n$field username").username)
assertEquals(
@@ -123,7 +123,7 @@ class PasswordEntryTest {
}
@Test
- fun testHasUsername() {
+ fun hasUsername() {
assertNotNull(makeEntry("secret\nextra\nlogin: username\ncontent\n").username)
assertNull(makeEntry("secret\nextra\ncontent\n").username)
assertNull(makeEntry("secret\nlogin failed\n").username)
@@ -132,7 +132,7 @@ class PasswordEntryTest {
}
@Test
- fun testGeneratesOtpFromTotpUri() = runTest {
+ fun generatesOtpFromTotpUri() = runTest {
val entry = makeEntry("secret\nextra\n$TOTP_URI")
assertTrue(entry.hasTotp())
entry.totp.test {
@@ -149,7 +149,7 @@ class PasswordEntryTest {
* blocked https://msfjarvis.dev/aps/issue/1550.
*/
@Test
- fun testGeneratedOtpHasCorrectRemainingTime() = runTest {
+ fun generatedOtpHasCorrectRemainingTime() = runTest {
val entry = makeEntry("secret\nextra\n$TOTP_URI", TestUserClock.withAddedSeconds(5))
assertTrue(entry.hasTotp())
entry.totp.test {
@@ -161,7 +161,7 @@ class PasswordEntryTest {
}
@Test
- fun testGeneratesOtpWithOnlyUriInFile() = runTest {
+ fun generatesOtpWithOnlyUriInFile() = runTest {
val entry = makeEntry(TOTP_URI)
assertNull(entry.password)
entry.totp.test {
@@ -173,7 +173,7 @@ class PasswordEntryTest {
}
@Test
- fun testOnlyLooksForUriInFirstLine() {
+ fun onlyLooksForUriInFirstLine() {
val entry = makeEntry("id:\n$TOTP_URI")
assertNotNull(entry.password)
assertTrue(entry.hasTotp())