@Test public void testSetTileSource() { NicTileSource oldTileSource = mock(NicTileSource.class); when(oldTileSource.getMaximumZoomLevel()).thenReturn(7); NicTileSource newTileSource = mock(NicTileSource.class); when(newTileSource.getMaximumZoomLevel()).thenReturn(42); IRegisterReceiver registerReceiver = mock(IRegisterReceiver.class); AssetTileProvider atp = new AssetTileProvider(registerReceiver, oldTileSource, null); assertEquals(atp.getMaximumZoomLevel(), 7); atp.setTileSource(newTileSource); assertEquals(atp.getMaximumZoomLevel(), 42); }
@Override public final void setTileSource(final ITileSource tileSource) { if (tileSource instanceof NicTileSource) { this.tileSource = (NicTileSource) tileSource; } else { throw new IllegalArgumentException("TileSource " + tileSource + " is not supported!"); } }
AssetTileProvider extends MapTileFileStorageProviderBase { @Override public final void setTileSource(final ITileSource tileSource) { if (tileSource instanceof NicTileSource) { this.tileSource = (NicTileSource) tileSource; } else { throw new IllegalArgumentException("TileSource " + tileSource + " is not supported!"); } } }
AssetTileProvider extends MapTileFileStorageProviderBase { @Override public final void setTileSource(final ITileSource tileSource) { if (tileSource instanceof NicTileSource) { this.tileSource = (NicTileSource) tileSource; } else { throw new IllegalArgumentException("TileSource " + tileSource + " is not supported!"); } } AssetTileProvider(final IRegisterReceiver registerReceiver, final NicTileSource tileSource,
                             AssetManager assetManager); }
AssetTileProvider extends MapTileFileStorageProviderBase { @Override public final void setTileSource(final ITileSource tileSource) { if (tileSource instanceof NicTileSource) { this.tileSource = (NicTileSource) tileSource; } else { throw new IllegalArgumentException("TileSource " + tileSource + " is not supported!"); } } AssetTileProvider(final IRegisterReceiver registerReceiver, final NicTileSource tileSource,
                             AssetManager assetManager); @Override int getMaximumZoomLevel(); @Override int getMinimumZoomLevel(); @Override boolean getUsesDataConnection(); @Override final void setTileSource(final ITileSource tileSource); }
AssetTileProvider extends MapTileFileStorageProviderBase { @Override public final void setTileSource(final ITileSource tileSource) { if (tileSource instanceof NicTileSource) { this.tileSource = (NicTileSource) tileSource; } else { throw new IllegalArgumentException("TileSource " + tileSource + " is not supported!"); } } AssetTileProvider(final IRegisterReceiver registerReceiver, final NicTileSource tileSource,
                             AssetManager assetManager); @Override int getMaximumZoomLevel(); @Override int getMinimumZoomLevel(); @Override boolean getUsesDataConnection(); @Override final void setTileSource(final ITileSource tileSource);  }