mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-15 13:19:45 +02:00
Reference exit codes directly in junit tests
This commit is contained in:
parent
0c24c2301d
commit
61ab35ad52
11 changed files with 72 additions and 63 deletions
|
@ -68,7 +68,7 @@ public class ExtractCertCmdTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@ExpectSystemExitWithStatus(41)
|
||||
@ExpectSystemExitWithStatus(SOPGPException.BadData.EXIT_CODE)
|
||||
public void key_badDataCausesExit41() throws IOException, SOPGPException.BadData {
|
||||
when(extractCert.key((InputStream) any())).thenThrow(new SOPGPException.BadData(new IOException()));
|
||||
SopCLI.main(new String[] {"extract-cert"});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue