mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
Add test for OpenPgpFingerprint.getBytes()
This commit is contained in:
parent
de3ea580e3
commit
76cf6173e8
1 changed files with 3 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
package org.pgpainless.key;
|
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.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
@ -112,6 +113,7 @@ public class OpenPgpV4FingerprintTest {
|
||||||
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
|
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
|
||||||
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
|
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
|
||||||
assertEquals(hex, fingerprint.toString());
|
assertEquals(hex, fingerprint.toString());
|
||||||
|
assertArrayEquals(binary, fingerprint.getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -122,6 +124,7 @@ public class OpenPgpV4FingerprintTest {
|
||||||
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
|
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.parseFromBinary(binary);
|
||||||
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
|
assertTrue(fingerprint instanceof OpenPgpV4Fingerprint);
|
||||||
assertEquals(hex, fingerprint.toString());
|
assertEquals(hex, fingerprint.toString());
|
||||||
|
assertArrayEquals(binary, fingerprint.getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue