Skip to content

Commit

Permalink
Use assertThrows()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 19, 2024
1 parent e44b530 commit db94046
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void testGetsDefaultIfOptional() throws Exception {
public void testLackOfError() throws Exception {
final String[] args = { "-k", "-a", "Caesar" };
final MissingArgumentException e = assertThrows(MissingArgumentException.class, () -> parser.parse(options, args));
parser.parse(options, args);
assertEquals("k", e.getOption().getOpt(), "option missing an argument");
}

Expand Down

0 comments on commit db94046

Please sign in to comment.