Changeset 18735 in josm for trunk/test/unit/org
- Timestamp:
- 2023-05-24T19:32:35+02:00 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
r17987 r18735 17 17 import java.util.concurrent.ForkJoinPool; 18 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 20 import net.trajano.commons.testing.UtilityClassTestUtil; 19 21 import org.junit.jupiter.api.Disabled; 20 22 import org.junit.jupiter.api.Test; 21 23 import org.junit.jupiter.api.extension.RegisterExtension; 24 import org.junit.jupiter.params.ParameterizedTest; 25 import org.junit.jupiter.params.provider.ValueSource; 22 26 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 27 import org.openstreetmap.josm.tools.UncheckedParseException; 24 25 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;26 import net.trajano.commons.testing.UtilityClassTestUtil;27 28 28 29 /** … … 116 117 * Verifies that parsing an illegal date throws a {@link UncheckedParseException} 117 118 */ 118 @Test 119 void testIllegalDate() { 120 assertThrows(UncheckedParseException.class, () -> DateUtils.fromString("2014-")); 119 @ParameterizedTest 120 @ValueSource(strings = {"2014-", "2014-01-", "2014-01-01T", "2014-00-01", "2014-01-00"}) 121 void testIllegalDate(String date) { 122 assertThrows(UncheckedParseException.class, () -> DateUtils.fromString(date)); 121 123 } 122 124
Note:
See TracChangeset
for help on using the changeset viewer.