Changeset 14066 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-07-29T00:41:59+02:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
r13112 r14066 16 16 import org.openstreetmap.josm.gui.layer.gpx.DownloadWmsAlongTrackAction.PrecacheWmsTask; 17 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 import org.openstreetmap.josm.testutils.TileSourceRule; 18 19 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 29 30 @Rule 30 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules().platform().main().projection(). timeout(20000);32 public JOSMTestRules test = new JOSMTestRules().platform().main().projection().fakeImagery().timeout(20000); 32 33 33 34 /** … … 45 46 @Test 46 47 public void testTMSLayer() throws Exception { 47 // Create new TMS layer and clear cache 48 TMSLayer layer = new TMSLayer(new ImageryInfo("OSM TMS", "https://a.tile.openstreetmap.org/{zoom}/{x}/{y}.png", "tms", null, null)); 48 final TileSourceRule tileSourceRule = this.test.getTileSourceRule(); 49 50 TMSLayer layer = new TMSLayer( 51 tileSourceRule.getSourcesList().get(0).getImageryInfo(tileSourceRule.port()) 52 ); 49 53 try { 50 54 MainApplication.getLayerManager().addLayer(layer); -
trunk/test/unit/org/openstreetmap/josm/testutils/TileSourceRule.java
r13078 r14066 214 214 this.stubFor(source.getMappingBuilder().willReturn(source.getResponseDefinitionBuilder())); 215 215 } 216 } 217 218 /** 219 * Get the tile sources served by this TileSourceRule. 220 * 221 * @return an unmodifiable list of the tile sources served by this TileSourceRule 222 */ 223 public List<ConstSource> getSourcesList() { 224 return Collections.unmodifiableList(this.sourcesList); 216 225 } 217 226
Note:
See TracChangeset
for help on using the changeset viewer.