From 62902ca80b2a0883d810518de8b1838f29a682eb Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 24 Apr 2022 21:25:34 +0530 Subject: Reorganize crypto-common code and fix a couple minor bugs (#1868) --- .../test/kotlin/dev/msfjarvis/aps/crypto/PGPKeyManagerTest.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crypto-pgpainless/src/test') diff --git a/crypto-pgpainless/src/test/kotlin/dev/msfjarvis/aps/crypto/PGPKeyManagerTest.kt b/crypto-pgpainless/src/test/kotlin/dev/msfjarvis/aps/crypto/PGPKeyManagerTest.kt index 650f3d89..1439d52d 100644 --- a/crypto-pgpainless/src/test/kotlin/dev/msfjarvis/aps/crypto/PGPKeyManagerTest.kt +++ b/crypto-pgpainless/src/test/kotlin/dev/msfjarvis/aps/crypto/PGPKeyManagerTest.kt @@ -5,6 +5,9 @@ import com.github.michaelbull.result.unwrapError import dev.msfjarvis.aps.crypto.GpgIdentifier.KeyId import dev.msfjarvis.aps.crypto.GpgIdentifier.UserId import dev.msfjarvis.aps.crypto.TestUtils.getArmoredPrivateKeyWithMultipleIdentities +import dev.msfjarvis.aps.crypto.errors.KeyAlreadyExistsException +import dev.msfjarvis.aps.crypto.errors.KeyNotFoundException +import dev.msfjarvis.aps.crypto.errors.NoKeysAvailableException import java.io.File import kotlin.test.AfterTest import kotlin.test.BeforeTest @@ -69,7 +72,7 @@ class PGPKeyManagerTest { keyManager.addKey(key, false).unwrap() val error = keyManager.addKey(key, false).unwrapError() - assertIs(error) + assertIs(error) } @Test @@ -142,7 +145,7 @@ class PGPKeyManagerTest { // Check returned key val error = keyManager.getKeyById(keyId).unwrapError() - assertIs(error) + assertIs(error) assertEquals("No key found with id: $keyId", error.message) } @@ -151,7 +154,7 @@ class PGPKeyManagerTest { scope.runTest { // Check returned key val error = keyManager.getKeyById(KeyId(0x08edf7567183ce44)).unwrapError() - assertIs(error) + assertIs(error) assertEquals("No keys were found", error.message) } -- cgit v1.2.3