@Test public void testEmptyXMLMapView() throws NicException, IOException { when(clientMock.getTilemapresourceXml("myMap")).thenReturn(""); DownloadMapResourceTask task = new DownloadMapResourceTask(null, clientMock, mapViewMock, "myMap"); task.doInBackground(); verifyZeroInteractions(mapViewMock); verifyZeroInteractions(indoorMapMock); }
@Override protected String doInBackground(Void... params) { String resourceXml = null; try { resourceXml = getXml(mapName); parseBoundingBox(resourceXml); parseZoomLevels(resourceXml); publishResourceData(); } catch (IOException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } catch (NicException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } success = true; return resourceXml; }
DownloadMapResourceTask extends DownloadTask<Void, Void, String> { @Override protected String doInBackground(Void... params) { String resourceXml = null; try { resourceXml = getXml(mapName); parseBoundingBox(resourceXml); parseZoomLevels(resourceXml); publishResourceData(); } catch (IOException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } catch (NicException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } success = true; return resourceXml; } }
DownloadMapResourceTask extends DownloadTask<Void, Void, String> { @Override protected String doInBackground(Void... params) { String resourceXml = null; try { resourceXml = getXml(mapName); parseBoundingBox(resourceXml); parseZoomLevels(resourceXml); publishResourceData(); } catch (IOException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } catch (NicException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } success = true; return resourceXml; } DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   String mapName,
                                   IndoorMap map,
                                   DownloadListener<String> listener);  DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   MapView mapView,
                                   String mapName); }
DownloadMapResourceTask extends DownloadTask<Void, Void, String> { @Override protected String doInBackground(Void... params) { String resourceXml = null; try { resourceXml = getXml(mapName); parseBoundingBox(resourceXml); parseZoomLevels(resourceXml); publishResourceData(); } catch (IOException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } catch (NicException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } success = true; return resourceXml; } DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   String mapName,
                                   IndoorMap map,
                                   DownloadListener<String> listener);  DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   MapView mapView,
                                   String mapName);  }
DownloadMapResourceTask extends DownloadTask<Void, Void, String> { @Override protected String doInBackground(Void... params) { String resourceXml = null; try { resourceXml = getXml(mapName); parseBoundingBox(resourceXml); parseZoomLevels(resourceXml); publishResourceData(); } catch (IOException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } catch (NicException e) { Log.e(TAG, "Failed to download tileMapResource.xml: " + e); success = false; } success = true; return resourceXml; } DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   String mapName,
                                   IndoorMap map,
                                   DownloadListener<String> listener);  DownloadMapResourceTask(Activity activity,
                                   MapServerClient mapServerClient,
                                   MapView mapView,
                                   String mapName);  static final int MIN_ZOOM_LEVEL_PLUS; }