// two formats for topp:states2, four formats and two tilesets for topp:states
assertNotNull(tileSets);
assertEquals(10, tileSets.size());
// check every possibility
TileSet tileSet = new TileSet("topp:states", "EPSG:900913", "image/png", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:900913", "image/jpeg", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:900913", "image/gif", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:900913", "application/vnd.google-earth.kml+xml",
null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:4326", "image/png", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:4326", "image/jpeg", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:4326", "image/gif", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states", "EPSG:4326", "application/vnd.google-earth.kml+xml",
null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states2", "EPSG:2163", "image/png", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states2", "EPSG:2163", "image/jpeg", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
// check the layer wide quotas
assertQuotaZero("topp:states");
assertQuotaZero("topp:states2");
// remove one layer from the dispatcher
Configuration configuration = layerDispatcher.removeLayer("topp:states");
configuration.save();
// and make sure at the next startup the store catches up (note this behaviour is just a
// startup consistency check in case the store got out of sync for some reason. On normal
// situations the store should have been notified through store.deleteLayer(layerName) if
// the layer was removed programmatically through StorageBroker.deleteLayer
store.close();
store.setDataSource(getDataSource());
store.initialize();
tileSets = store.getTileSets();
assertNotNull(tileSets);
assertEquals(2, tileSets.size());
tileSet = new TileSet("topp:states2", "EPSG:2163", "image/png", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
tileSet = new TileSet("topp:states2", "EPSG:2163", "image/jpeg", null);
assertTrue(tileSets.contains(tileSet));
assertQuotaZero(tileSet);
}