1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-14 00:12:06 +01:00

Add test for OpenPgpFingerprint.getBytes()

This commit is contained in:
Paul Schaub 2023-09-12 15:03:02 +02:00
parent 8bd53dd95b
commit 35f64e8c39
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -4,6 +4,7 @@
package org.pgpainless.key;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ -112,6 +113,7 @@ public class OpenPgpV4FingerprintTest {
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
assertEquals(hex, fingerprint.toString());
assertArrayEquals(binary, fingerprint.getBytes());
}
@Test
@ -122,6 +124,7 @@ public class OpenPgpV4FingerprintTest {
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
assertEquals(hex, fingerprint.toString());
assertArrayEquals(binary, fingerprint.getBytes());
}
@Test