Changeset 32984 in osm for applications/editors/josm/plugins/mapillary/test
- Timestamp:
- 2016-09-11T14:14:51+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCacheTest.java
r32923 r32984 9 9 import java.io.IOException; 10 10 11 import org.apache.commons.jcs.access.CacheAccess; 11 12 import org.junit.Before; 12 13 import org.junit.Test; 13 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry; 14 16 import org.openstreetmap.josm.data.cache.JCSCacheManager; 15 17 import org.openstreetmap.josm.plugins.mapillary.AbstractTest; … … 18 20 19 21 public class MapillaryCacheTest extends AbstractTest { 20 21 @Before22 public void setUp() throws IOException {23 MapillaryPlugin.cache = JCSCacheManager.getCache("mapillary", 10, 10000,24 new File(Main.pref.getPluginsDirectory(), "mapillary").getPath() + "/cache/");25 }26 22 27 23 @Test 28 public void test() { 29 MapillaryCache cache = new MapillaryCache("00000", Type.FULL_IMAGE); 24 public void test() throws IOException { 25 CacheAccess<String, BufferedImageCacheEntry> cacheAccess = JCSCacheManager.getCache("mapillary", 10, 10000, 26 new File(Main.pref.getPluginsDirectory(), "mapillary").getPath() + "/cache/"); 27 28 MapillaryCache cache = new MapillaryCache(cacheAccess, "00000", Type.FULL_IMAGE); 30 29 assertNotEquals(null, cache.getUrl()); 31 30 assertNotEquals(null, cache.getCacheKey()); … … 33 32 assertFalse(cache.isObjectLoadable()); 34 33 35 cache = new MapillaryCache("00000", Type.THUMBNAIL); 34 cache = new MapillaryCache(cacheAccess, "00000", Type.THUMBNAIL); 36 35 assertNotEquals(null, cache.getCacheKey()); 37 36 assertNotEquals(null, cache.getUrl()); 38 37 39 cache = new MapillaryCache(null, null); 38 cache = new MapillaryCache(cacheAccess, null, null); 40 39 assertEquals(null, cache.getCacheKey()); 41 40 assertEquals(null, cache.getUrl());
Note:
See TracChangeset
for help on using the changeset viewer.
