Skip to content

Commit 9094fbf

Browse files
committed
coverage
1 parent 8750f09 commit 9094fbf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/test/java/org/cip4/jdfutility/FileItemListTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
import static org.junit.jupiter.api.Assertions.assertFalse;
7575
import static org.junit.jupiter.api.Assertions.assertNotNull;
7676
import static org.junit.jupiter.api.Assertions.assertNull;
77+
import static org.junit.jupiter.api.Assertions.assertThrows;
7778
import static org.junit.jupiter.api.Assertions.assertTrue;
7879
import static org.mockito.ArgumentMatchers.any;
7980
import static org.mockito.Mockito.mock;
@@ -160,4 +161,14 @@ HttpServletRequest getRequestMock() throws IOException, ServletException
160161
return mock;
161162
}
162163

164+
@Test
165+
void testGetFactory() throws Exception
166+
{
167+
final FileItemList l = new FileItemList(getRequestMock(), 42);
168+
assertThrows(IllegalArgumentException.class, () -> l.getFactory(true, 0));
169+
l.getFactory(false, 0);
170+
l.getFactory(false, 99999);
171+
l.getFactory(true, 99999);
172+
}
173+
163174
}

0 commit comments

Comments
 (0)