mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-17 01:31:08 +01:00
Modified Passphrase.fromPassword() to apply null value to be much clearer for Kotlin. Added a test for that.
This commit is contained in:
parent
cd19f91d77
commit
e77e97bc08
2 changed files with 10 additions and 3 deletions
|
|
@ -37,4 +37,11 @@ public class PassphraseTest {
|
|||
assertFalse(passphrase.isValid());
|
||||
assertThrows(IllegalStateException.class, passphrase::getChars);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFromPasswordNull() {
|
||||
Passphrase passphrase = Passphrase.fromPassword(null);
|
||||
assertArrayEquals(null, passphrase.getChars());
|
||||
assertTrue(passphrase.isValid());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue