Search in sources :

Example 6 with DownloadStatusInfoImpl

use of ddf.catalog.event.retrievestatus.DownloadStatusInfoImpl in project ddf by codice.

the class ReliableResourceDownloadManagerTest method setup.

@Before
public void setup() {
    resourceCache = mock(ResourceCacheImpl.class);
    when(resourceCache.getProductCacheDirectory()).thenReturn(productCacheDirectory);
    eventPublisher = mock(DownloadsStatusEventPublisher.class);
    eventListener = mock(DownloadsStatusEventListener.class);
    downloadStatusInfo = new DownloadStatusInfoImpl();
    downloadMgr = new ReliableResourceDownloadManager(getDownloaderConfig(), downloadStatusInfo, Executors.newSingleThreadExecutor());
}
Also used : ResourceCacheImpl(ddf.catalog.cache.impl.ResourceCacheImpl) DownloadStatusInfoImpl(ddf.catalog.event.retrievestatus.DownloadStatusInfoImpl) DownloadsStatusEventListener(ddf.catalog.event.retrievestatus.DownloadsStatusEventListener) DownloadsStatusEventPublisher(ddf.catalog.event.retrievestatus.DownloadsStatusEventPublisher) Before(org.junit.Before)

Aggregations

DownloadStatusInfoImpl (ddf.catalog.event.retrievestatus.DownloadStatusInfoImpl)6 Metacard (ddf.catalog.data.Metacard)5 ResourceResponse (ddf.catalog.operation.ResourceResponse)5 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)5 Test (org.junit.Test)5 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)5 ResourceCacheImpl (ddf.catalog.cache.impl.ResourceCacheImpl)4 MockInputStream (ddf.catalog.cache.MockInputStream)2 IOException (java.io.IOException)2 CountingOutputStream (com.google.common.io.CountingOutputStream)1 DownloadsStatusEventListener (ddf.catalog.event.retrievestatus.DownloadsStatusEventListener)1 DownloadsStatusEventPublisher (ddf.catalog.event.retrievestatus.DownloadsStatusEventPublisher)1 ReliableResource (ddf.catalog.resource.data.ReliableResource)1 ResourceRetriever (ddf.catalog.resourceretriever.ResourceRetriever)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileOutputStream (java.io.FileOutputStream)1 CancellationException (java.util.concurrent.CancellationException)1 Before (org.junit.Before)1 Ignore (org.junit.Ignore)1