File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2020import static org .junit .jupiter .api .Assertions .assertEquals ;
2121import static org .junit .jupiter .api .Assertions .assertNotNull ;
2222import static org .junit .jupiter .api .Assertions .assertThrows ;
23+ import static org .junit .jupiter .api .Assertions .assertTrue ;
2324
2425import java .io .File ;
2526import java .io .FileInputStream ;
@@ -210,15 +211,20 @@ public void testCreateFile() {
210211 assertEquals (file , TypeHandler .createFile (file .toString ()));
211212 }
212213
214+ @ Test
215+ public void testCreateFiles () {
216+ assertThrows (UnsupportedOperationException .class , () -> TypeHandler .createFiles (null ));
217+ }
218+
213219 @ Test
214220 public void testCreateNumber () throws ParseException {
215221 assertEquals (0L , TypeHandler .createNumber ("0" ));
216222 assertEquals (0d , TypeHandler .createNumber ("0.0" ));
217223 }
218224
219225 @ Test
220- public void testCreateFiles () {
221- assertThrows ( UnsupportedOperationException . class , () -> TypeHandler . createFiles ( null ) );
226+ public void testCreateObject () throws ParseException {
227+ assertTrue ( TypeHandler . createObject ( Date . class . getName ()) instanceof Date );
222228 }
223229
224230 @ Test
You can’t perform that action at this time.
0 commit comments