Changeset 14499 in josm for trunk/test
- Timestamp:
- 2018-12-03T00:26:23+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r14497 r14499 16 16 import org.junit.Rule; 17 17 import org.junit.Test; 18 import org.openstreetmap.gui.jmapviewer.tilesources.AbstractTileSource; 19 import org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource; 20 import org.openstreetmap.gui.jmapviewer.tilesources.ScanexTileSource; 21 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource; 18 22 import org.openstreetmap.josm.data.imagery.ImageryInfo; 19 23 import org.openstreetmap.josm.data.imagery.ImageryLayerInfo; 24 import org.openstreetmap.josm.data.imagery.TemplatedWMSTileSource; 25 import org.openstreetmap.josm.data.imagery.WMSEndpointTileSource; 26 import org.openstreetmap.josm.data.imagery.WMTSTileSource; 27 import org.openstreetmap.josm.data.imagery.WMTSTileSource.WMTSGetCapabilitiesException; 28 import org.openstreetmap.josm.data.projection.ProjectionRegistry; 20 29 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 30 import org.openstreetmap.josm.tools.HttpClient; … … 35 44 @Rule 36 45 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 37 public JOSMTestRules test = new JOSMTestRules().https(). timeout(10000*60);46 public JOSMTestRules test = new JOSMTestRules().https().projection().projectionNadGrids().timeout(10000*60); 38 47 39 48 private final Map<String, Map<ImageryInfo, List<String>>> errors = Collections.synchronizedMap(new TreeMap<>()); … … 80 89 checkUrl(info, info.getTermsOfUseURL()); 81 90 91 try { 92 getTileSource(info); 93 } catch (IOException | WMTSGetCapabilitiesException | IllegalArgumentException e) { 94 addError(info, e.toString()); 95 } 96 82 97 for (ImageryInfo mirror : info.getMirrors()) { 83 98 checkEntry(mirror); 99 } 100 } 101 102 private static AbstractTileSource getTileSource(ImageryInfo info) throws IOException, WMTSGetCapabilitiesException { 103 switch (info.getImageryType()) { 104 case BING: 105 return new BingAerialTileSource(); 106 case SCANEX: 107 return new ScanexTileSource(info); 108 case TMS: 109 return new TemplatedTMSTileSource(info); 110 case WMS: 111 return new TemplatedWMSTileSource(info, ProjectionRegistry.getProjection()); 112 case WMS_ENDPOINT: 113 return new WMSEndpointTileSource(info, ProjectionRegistry.getProjection()); 114 case WMTS: 115 return new WMTSTileSource(info); 116 default: 117 throw new UnsupportedOperationException(info.toString()); 84 118 } 85 119 }
Note:
See TracChangeset
for help on using the changeset viewer.