WalletTest: Be more specific about the expected exception in encryptionDecryptionBadPassword().

This commit is contained in:
Andreas Schildbach
2019-03-31 13:05:48 +02:00
parent 43a7df3838
commit f1e67faa0b

View File

@@ -2024,8 +2024,10 @@ public class WalletTest extends TestWithWallet {
try { try {
encryptedWallet.decrypt(wrongAesKey); encryptedWallet.decrypt(wrongAesKey);
fail("Incorrectly decoded wallet with wrong password"); fail("Incorrectly decoded wallet with wrong password");
} catch (KeyCrypterException ede) { } catch (KeyCrypterException.InvalidCipherText e) {
// Expected. // Expected, either this...
} catch (KeyCrypterException.PublicPrivateMismatch e) {
// ...or this.
} }
} }