1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-05 03:41:07 +01:00

Backport test

This commit is contained in:
Paul Schaub 2025-09-26 12:38:08 +02:00
parent 6584c36dd1
commit 21ea5da320
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -15,7 +15,6 @@ import java.io.IOException;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPSecretKey;
import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.bouncycastle.openpgp.api.OpenPGPKey;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.pgpainless.PGPainless;
@ -108,8 +107,7 @@ public class GenerateKeyTest {
.userId("Foo\n\nBar")
.generate()
.getBytes();
OpenPGPKey key = PGPainless.getInstance().readKey().parseKey(keyBytes);
assertTrue(key.getValidUserIds().get(0).getUserId().equals("Foo\n\nBar"));
PGPSecretKeyRing key = PGPainless.readKeyRing().secretKeyRing(keyBytes);
assertTrue(PGPainless.inspectKeyRing(key).getValidUserIds().get(0).equals("Foo\n\nBar"));
}
}