1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-22 10:57:58 +01:00

Add test for OpenPgpFingerprint.getBytes()

This commit is contained in:
Paul Schaub 2023-09-12 15:03:02 +02:00
parent de3ea580e3
commit 76cf6173e8
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