Changeset 14694 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-01-13T15:19:55+01:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererTest.java
r14202 r14694 6 6 7 7 import org.junit.Test; 8 import org.openstreetmap.josm.TestUtils; 8 9 import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.StyleRecord; 9 10 … … 85 86 @Test 86 87 public void testEqualsContract() { 88 TestUtils.assumeWorkingEqualsVerifier(); 87 89 EqualsVerifier.forClass(StyleRecord.class).usingGetClass() 88 90 .suppress(Warning.NONFINAL_FIELDS) -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r14616 r14694 76 76 public class ImageryPreferenceTestIT { 77 77 78 private static final String ERROR_SEP = " -> "; 78 79 private static final LatLon GREENWICH = new LatLon(51.47810, -0.00170); 79 80 private static final int DEFAULT_ZOOM = 12; … … 157 158 if (notIgnoredErrors.contains(errorMsg)) 158 159 notIgnoredErrors.remove(errorMsg); 159 return addError(errorsToIgnore.contains(errorMsg) ? ignoredErrors : errors, info, errorMsg); 160 return addError(isIgnoredError(errorMsg) ? ignoredErrors : errors, info, errorMsg); 161 } 162 163 private boolean isIgnoredError(String errorMsg) { 164 int idx = errorMsg.lastIndexOf(ERROR_SEP); 165 return errorsToIgnore.contains(errorMsg) || (idx > -1 && errorsToIgnore.contains(errorMsg.substring(idx + ERROR_SEP.length()))); 160 166 } 161 167 … … 190 196 } catch (IOException e) { 191 197 if (response.getResponseCode() < 300) { 192 addError(info, url + " -> "+ e);198 addError(info, url + ERROR_SEP + e); 193 199 } 194 200 } finally { … … 196 202 } 197 203 } catch (IOException e) { 198 addError(info, url + " -> "+ e);204 addError(info, url + ERROR_SEP + e); 199 205 } 200 206 } … … 244 250 245 251 private static String zoomMarker(int zoom) { 246 return " -> zoom " + zoom + " -> ";252 return " -> zoom " + zoom + ERROR_SEP; 247 253 } 248 254 … … 338 344 } 339 345 } catch (IOException | RuntimeException | WMSGetCapabilitiesException | WMTSGetCapabilitiesException e) { 340 addError(info, info.getUrl() + " -> "+ e.toString());346 addError(info, info.getUrl() + ERROR_SEP + e.toString()); 341 347 } 342 348 … … 347 353 348 354 private static boolean isZoomError(String error) { 349 String[] parts = error.split( " -> ");355 String[] parts = error.split(ERROR_SEP); 350 356 String lastPart = parts.length > 0 ? parts[parts.length - 1].toLowerCase(Locale.ENGLISH) : ""; 351 357 return lastPart.contains("bbox")
Note:
See TracChangeset
for help on using the changeset viewer.