Search in sources :

Example 1 with NoCache

use of org.magic.api.cache.impl.NoCache in project MtgDesktopCompanion by nicho92.

the class PicturesProviderTests method removeCache.

@Before
public void removeCache() {
    MTGLogger.changeLevel(Level.ERROR);
    List<MTGPicturesCache> caches = MTGControler.getInstance().getListCaches();
    MTGControler.getInstance().getListCaches().removeAll(caches);
    MTGPicturesCache cache = new NoCache();
    cache.enable(true);
    MTGControler.getInstance().getListCaches().add(cache);
}
Also used : MTGPicturesCache(org.magic.api.interfaces.MTGPicturesCache) NoCache(org.magic.api.cache.impl.NoCache) Before(org.junit.Before)

Example 2 with NoCache

use of org.magic.api.cache.impl.NoCache in project MtgDesktopCompanion by nicho92.

the class CacheProviderTests method test.

@Test
public void test() {
    test(new NoCache());
    test(new MemoryCache());
    test(new FileCache());
}
Also used : MemoryCache(org.magic.api.cache.impl.MemoryCache) NoCache(org.magic.api.cache.impl.NoCache) FileCache(org.magic.api.cache.impl.FileCache) Test(org.junit.Test)

Aggregations

NoCache (org.magic.api.cache.impl.NoCache)2 Before (org.junit.Before)1 Test (org.junit.Test)1 FileCache (org.magic.api.cache.impl.FileCache)1 MemoryCache (org.magic.api.cache.impl.MemoryCache)1 MTGPicturesCache (org.magic.api.interfaces.MTGPicturesCache)1