You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/04/11 11:49:56 UTC

(commons-cli) 07/15: Add missing Builder test

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git

commit c27d503e3cf4589a20fe63f482c10f830d9a4b86
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Apr 11 06:52:35 2024 -0400

    Add missing Builder test
---
 src/test/java/org/apache/commons/cli/OptionTest.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/java/org/apache/commons/cli/OptionTest.java b/src/test/java/org/apache/commons/cli/OptionTest.java
index 689d2cd..9f00624 100644
--- a/src/test/java/org/apache/commons/cli/OptionTest.java
+++ b/src/test/java/org/apache/commons/cli/OptionTest.java
@@ -107,6 +107,11 @@ public class OptionTest {
         assertThrows(IllegalArgumentException.class, () -> option.processValue(""));
     }
 
+    @Test
+    public void testBuilderEmpty() {
+        assertThrows(IllegalArgumentException.class, () -> Option.builder().build());
+    }
+
     @Test
     public void testBuilderInsufficientParams1() {
         assertThrows(IllegalArgumentException.class, () -> Option.builder().desc("desc").build());