private boolean parseURL(DownloadDialog gui) { Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText()); if (b == null) return false; gui.boundingBoxChanged(b, BoundingBoxSelection.this); updateBboxFields(b); updateUrl(b); return true; }
/** Test URL parsing */ @Test public void testParse() { for (ParseTestItem item : parseTestData) { Bounds bounds = null; try { bounds = OsmUrlToBounds.parse(item.url); } catch (IllegalArgumentException e) { // Ignore. check if bounds is null after } Assert.assertEquals(item.url, item.bounds, bounds); } }