Skip to content

Commit c0d93d0

Browse files
committed
Add missing test
1 parent e4e5a05 commit c0d93d0

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2020
import static org.junit.jupiter.api.Assertions.assertEquals;
2121
import static org.junit.jupiter.api.Assertions.assertNotNull;
2222
import static org.junit.jupiter.api.Assertions.assertThrows;
23+
import static org.junit.jupiter.api.Assertions.assertTrue;
2324

2425
import java.io.File;
2526
import 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

0 commit comments

Comments
 (0)