Changeset 15051 in josm for trunk/test/unit
- Timestamp:
- 2019-05-05T17:35:29+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
r15015 r15051 265 265 Config.getPref().putList(prefix + ".mandatory-terms", null); 266 266 Config.getPref().putList(prefix + ".forbidden-terms", null); 267 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def ));267 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def, def)); 268 268 269 269 Config.getPref().putList(prefix + ".mandatory-terms", Arrays.asList("foo")); 270 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def ));270 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def, def)); 271 271 assertEquals("The following required terms are missing: [foo]", 272 UploadAction.validateUploadTag("bar", prefix, def, def ));272 UploadAction.validateUploadTag("bar", prefix, def, def, def)); 273 273 274 274 Config.getPref().putList(prefix + ".forbidden-terms", Arrays.asList("bar")); 275 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def)); 276 assertEquals("The following forbidden terms have been found: [bar]", 277 UploadAction.validateUploadTag("foobar", prefix, def, def)); 278 assertEquals("The following forbidden terms have been found: [bar]", 279 UploadAction.validateUploadTag("FOOBAR", prefix, def, def)); 275 assertNull(UploadAction.validateUploadTag("foo", prefix, def, def, def)); 276 assertEquals("The following forbidden terms have been found: [bar]", 277 UploadAction.validateUploadTag("foobar", prefix, def, def, def)); 278 assertEquals("The following forbidden terms have been found: [bar]", 279 UploadAction.validateUploadTag("FOOBAR", prefix, def, def, def)); 280 281 Config.getPref().putList(prefix + ".exception-terms", Arrays.asList("barosm")); 282 assertEquals("The following forbidden terms have been found: [bar]", 283 UploadAction.validateUploadTag("foobar", prefix, def, def, def)); 284 assertEquals("The following forbidden terms have been found: [bar]", 285 UploadAction.validateUploadTag("FOOBAR", prefix, def, def, def)); 286 assertNull(UploadAction.validateUploadTag("foobarosm", prefix, def, def, def)); 287 assertNull(UploadAction.validateUploadTag("FOOBAROSM", prefix, def, def, def)); 280 288 } 281 289
Note:
See TracChangeset
for help on using the changeset viewer.