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 c0d93d0  Add missing test
c0d93d0 is described below

commit c0d93d03b9fa3ba398e8c38804535605972effe8
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Apr 7 13:23:39 2024 -0400

    Add missing test
---
 src/test/java/org/apache/commons/cli/TypeHandlerTest.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java 
b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
index 9017fdb..cac9497 100644
--- a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
+++ b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
@@ -20,6 +20,7 @@ package org.apache.commons.cli;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -210,6 +211,11 @@ public class TypeHandlerTest {
         assertEquals(file, TypeHandler.createFile(file.toString()));
     }
 
+    @Test
+    public void testCreateFiles() {
+        assertThrows(UnsupportedOperationException.class, () -> 
TypeHandler.createFiles(null));
+    }
+
     @Test
     public void testCreateNumber() throws ParseException {
         assertEquals(0L, TypeHandler.createNumber("0"));
@@ -217,8 +223,8 @@ public class TypeHandlerTest {
     }
 
     @Test
-    public void testCreateFiles() {
-        assertThrows(UnsupportedOperationException.class, () -> 
TypeHandler.createFiles(null));
+    public void testCreateObject() throws ParseException {
+        assertTrue(TypeHandler.createObject(Date.class.getName()) instanceof 
Date);
     }
 
     @Test

Reply via email to