Search in sources :

Example 6 with ReadStorageRequestImpl

use of ddf.catalog.content.operation.impl.ReadStorageRequestImpl in project ddf by codice.

the class FileSystemStorageProviderTest method testReadDeletedRemoteReference.

@Test(expected = StorageException.class)
public void testReadDeletedRemoteReference() throws Exception {
    CreateStorageResponse createResponse = assertContentItem(TEST_INPUT_CONTENTS, NITF_MIME_TYPE, TEST_INPUT_FILENAME, Collections.singletonMap(Constants.STORE_REFERENCE_KEY, "http://testHostName:12345/test.txt"));
    URI uri = new URI(createResponse.getCreatedContentItems().get(0).getUri());
    provider.read(new ReadStorageRequestImpl(uri, Collections.emptyMap()));
}
Also used : CreateStorageResponse(ddf.catalog.content.operation.CreateStorageResponse) ReadStorageRequestImpl(ddf.catalog.content.operation.impl.ReadStorageRequestImpl) URI(java.net.URI) Test(org.junit.Test)

Aggregations

ReadStorageRequestImpl (ddf.catalog.content.operation.impl.ReadStorageRequestImpl)6 URI (java.net.URI)6 ReadStorageResponse (ddf.catalog.content.operation.ReadStorageResponse)5 ContentItem (ddf.catalog.content.data.ContentItem)4 ReadStorageRequest (ddf.catalog.content.operation.ReadStorageRequest)4 CreateStorageResponse (ddf.catalog.content.operation.CreateStorageResponse)3 Matchers.isEmptyString (org.hamcrest.Matchers.isEmptyString)3 Test (org.junit.Test)3 ByteSource (com.google.common.io.ByteSource)1 StorageException (ddf.catalog.content.StorageException)1 ContentItemImpl (ddf.catalog.content.data.impl.ContentItemImpl)1 CreateStorageRequest (ddf.catalog.content.operation.CreateStorageRequest)1 CreateStorageRequestImpl (ddf.catalog.content.operation.impl.CreateStorageRequestImpl)1 Metacard (ddf.catalog.data.Metacard)1 ResourceResponse (ddf.catalog.operation.ResourceResponse)1 ResourceResponseImpl (ddf.catalog.operation.impl.ResourceResponseImpl)1 ResourceNotFoundException (ddf.catalog.resource.ResourceNotFoundException)1 ResourceImpl (ddf.catalog.resource.impl.ResourceImpl)1 BufferedInputStream (java.io.BufferedInputStream)1 InputStream (java.io.InputStream)1