aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain-Test
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-09-23 16:16:16 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-09-23 16:16:16 +0200
commitbf9a708e84646e51151d315a48aa33b5b9b0c69e (patch)
treebaa22e617f9ac414d8d2c79cb6a5c35fe65f7b7a /OpenKeychain-Test
parent070017b12febe8012cd1381fcff8addfd82211f6 (diff)
downloadopen-keychain-bf9a708e84646e51151d315a48aa33b5b9b0c69e.tar.gz
open-keychain-bf9a708e84646e51151d315a48aa33b5b9b0c69e.tar.bz2
open-keychain-bf9a708e84646e51151d315a48aa33b5b9b0c69e.zip
fix test case for new PassphraeCacheInterface
Diffstat (limited to 'OpenKeychain-Test')
-rw-r--r--OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java
index cc2eda3bc..d6865f8ea 100644
--- a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java
+++ b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java
@@ -264,10 +264,19 @@ public class PgpEncryptDecryptTest {
}
@Override
- public String getCachedPassphrase(long masterKeyId) throws NoSecretKeyException {
+ public String getCachedPassphrase(long masterKeyId, long subKeyId) throws NoSecretKeyException {
if (mExpectedId != null){
Assert.assertEquals("requested passphrase must be for expected id",
- (long) mExpectedId, masterKeyId);
+ (long) mExpectedId, subKeyId);
+ }
+ return mPassphrase;
+ }
+
+ @Override
+ public String getCachedPassphrase(long subKeyId) throws NoSecretKeyException {
+ if (mExpectedId != null){
+ Assert.assertEquals("requested passphrase must be for expected id",
+ (long) mExpectedId, subKeyId);
}
return mPassphrase;
}