mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-12 11:49:38 +02:00
EncryptionOptions.addRecipients(collection): Disallow empty collections
Fixes #281
This commit is contained in:
parent
51cd75533b
commit
b980fcd7b1
2 changed files with 14 additions and 0 deletions
|
@ -116,6 +116,14 @@ public class EncryptionOptionsTest {
|
|||
assertTrue(encryptionKeys.contains(encryptStorage));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddEmptyRecipientsFails() {
|
||||
EncryptionOptions options = new EncryptionOptions();
|
||||
assertThrows(IllegalArgumentException.class, () -> options.addRecipients(Collections.emptyList()));
|
||||
assertThrows(IllegalArgumentException.class, () -> options.addRecipients(Collections.emptyList(),
|
||||
encryptionCapableKeys -> encryptionCapableKeys));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddEmptyPassphraseFails() {
|
||||
EncryptionOptions options = new EncryptionOptions();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue