@Test(expected = IllegalArgumentException.class) public void testSetWrongTileSource() { IRegisterReceiver registerReceiver = mock(IRegisterReceiver.class); NicTileSource goodTileSource = mock(NicTileSource.class); ITileSource badTileSource = mock(ITileSource.class); AssetTileProvider atp = new AssetTileProvider(registerReceiver, goodTileSource, null); atp.setTileSource(badTileSource); }
@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);  }