Skip to content

Commit 4fde00c

Browse files
committed
Add missing API test
1 parent 2028b84 commit 4fde00c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/test/java/org/apache/commons/cli/OptionTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ private Option roundTrip(final Option o) throws IOException, ClassNotFoundExcept
104104
return (Option) ois.readObject();
105105
}
106106

107+
@Test
108+
public void testAddValue() {
109+
final Option option = new Option("f", null);
110+
assertThrows(UnsupportedOperationException.class, () -> option.addValue(""));
111+
}
112+
107113
@Test
108114
public void testBuilderInsufficientParams1() {
109115
assertThrows(IllegalArgumentException.class, () -> Option.builder().desc("desc").build());

0 commit comments

Comments
 (0)