Even more tests

This commit is contained in:
Paul Schaub 2023-01-21 21:17:57 +01:00
parent 9cf6301b8c
commit e73c7e5f91
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 31 additions and 7 deletions

View file

@ -228,4 +228,16 @@ public class ExternalDetachedSignVerifyRoundTripTest extends AbstractExternalSOP
.isEmpty());
}
@Test
public void verifyMissingCertCausesMissingArg() {
ignoreIf("PGPainless-SOP", Is.geq, "0.0.0"); // PGPainless uses picocli which throws
// UNSUPPORTED_OPTION for missing arg
byte[] message = TestData.PLAINTEXT.getBytes(StandardCharsets.UTF_8);
assertThrows(SOPGPException.MissingArg.class, () ->
getSop().verify()
.signatures(TestData.ALICE_DETACHED_SIGNED_MESSAGE.getBytes(StandardCharsets.UTF_8))
.data(message));
}
}