kopia lustrzana https://github.com/JOSM/MapWithAI
Fix broken test (data was imported) and change a logging.error to logging.debug
Signed-off-by: Taylor Smock <smocktaylor@gmail.com>pull/1/head
rodzic
f18cceebd8
commit
c2fafd48bb
|
@ -35,13 +35,12 @@ public final class RapiDDataUtils {
|
|||
|
||||
@SuppressWarnings("PMD.DataflowAnomalyAnalysis")
|
||||
public static DataSet getData(BBox bbox) {
|
||||
Logging.setLogLevel(Logging.LEVEL_DEBUG);
|
||||
InputStream inputStream = null;
|
||||
DataSet dataSet = new DataSet();
|
||||
for (String urlString : API_LIST) {
|
||||
try {
|
||||
final URL url = new URL(urlString.replace("{bbox}", bbox.toStringCSV(",")));
|
||||
Logging.error("{0}: Getting {1}", RapiDPlugin.NAME, url.toString());
|
||||
Logging.debug("{0}: Getting {1}", RapiDPlugin.NAME, url.toString());
|
||||
|
||||
inputStream = url.openStream();
|
||||
dataSet.mergeFrom(OsmReader.parseDataSet(inputStream, null));
|
||||
|
|
|
@ -19,8 +19,8 @@ public class RapiDDataUtilsTest {
|
|||
@Test
|
||||
public void testGetData() {
|
||||
BBox testBBox = new BBox();
|
||||
testBBox.add(new LatLon(39.066058, -108.5683808));
|
||||
testBBox.add(new LatLon(39.0667526, -108.5681757));
|
||||
testBBox.add(new LatLon(39.0666521, -108.5707187));
|
||||
testBBox.add(new LatLon(39.0664016, -108.5702225));
|
||||
DataSet ds = new DataSet(RapiDDataUtils.getData(testBBox));
|
||||
Assert.assertEquals(1, ds.getWays().size());
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue