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


The following commit(s) were added to refs/heads/master by this push:
     new c883390  Add missing test
c883390 is described below

commit c88339084264401004cc2535738d7472e344e253
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Apr 8 07:58:43 2024 -0400

    Add missing test
---
 .../cli/UnrecognizedOptionExceptionTest.java       | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git 
a/src/test/java/org/apache/commons/cli/UnrecognizedOptionExceptionTest.java 
b/src/test/java/org/apache/commons/cli/UnrecognizedOptionExceptionTest.java
new file mode 100644
index 0000000..85f7b8b
--- /dev/null
+++ b/src/test/java/org/apache/commons/cli/UnrecognizedOptionExceptionTest.java
@@ -0,0 +1,34 @@
+/*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+package org.apache.commons.cli;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests {@link UnrecognizedOptionException}.
+ */
+public class UnrecognizedOptionExceptionTest {
+
+    @Test
+    public void testConstructor() {
+        assertEquals("a", new UnrecognizedOptionException("a").getMessage());
+        assertEquals("a", new UnrecognizedOptionException("a", 
"b").getMessage());
+        assertEquals("b", new UnrecognizedOptionException("a", 
"b").getOption());
+    }
+}

Reply via email to