use of org.codice.alliance.nsili.common.GIAS.OrderContents in project alliance by codice.
the class OrderRequestImplTest method testMultipleFilesGZipOrder.
@Test
public void testMultipleFilesGZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.FILESGZIP.name();
OrderRequestImpl orderRequest = new OrderRequestImpl(order, accessManager, mockCatalogFramework, destination -> Optional.of(mock(DestinationSink.class)));
DeliveryManifestHolder holder = new DeliveryManifestHolder();
orderRequest.complete(holder);
assertThat(holder.value, notNullValue());
assertThat(holder.value.elements[0].files.length, is(2));
}
use of org.codice.alliance.nsili.common.GIAS.OrderContents in project alliance by codice.
the class OrderRequestImplTest method testMultipleTarGZipOrder.
@Test
public void testMultipleTarGZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.TARGZIP.name();
OrderRequestImpl orderRequest = new OrderRequestImpl(order, accessManager, mockCatalogFramework, destination -> Optional.of(mock(DestinationSink.class)));
DeliveryManifestHolder holder = new DeliveryManifestHolder();
orderRequest.complete(holder);
assertThat(holder.value, notNullValue());
assertThat(holder.value.elements[0].files.length, is(1));
}
use of org.codice.alliance.nsili.common.GIAS.OrderContents in project alliance by codice.
the class OrderRequestImplTest method testSingleFilesGZipOrder.
@Test
public void testSingleFilesGZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.FILESGZIP.name();
OrderRequestImpl orderRequest = new OrderRequestImpl(order, accessManager, mockCatalogFramework, destination -> Optional.of(mock(DestinationSink.class)));
DeliveryManifestHolder holder = new DeliveryManifestHolder();
orderRequest.complete(holder);
assertThat(holder.value, notNullValue());
assertThat(holder.value.elements[0].files.length, is(1));
}
use of org.codice.alliance.nsili.common.GIAS.OrderContents in project alliance by codice.
the class OrderRequestImplTest method testSingleTarCompressOrder.
@Test
public void testSingleTarCompressOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.TARCOMPRESS.name();
OrderRequestImpl orderRequest = new OrderRequestImpl(order, accessManager, mockCatalogFramework, destination -> Optional.of(mock(DestinationSink.class)));
DeliveryManifestHolder holder = new DeliveryManifestHolder();
orderRequest.complete(holder);
assertThat(holder.value, notNullValue());
assertThat(holder.value.elements[0].files.length, is(1));
}
use of org.codice.alliance.nsili.common.GIAS.OrderContents in project alliance by codice.
the class OrderRequestImplTest method getRequestDescription.
@Test
public void getRequestDescription() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
OrderRequestImpl orderRequest = new OrderRequestImpl(order, PROTOCOL, PORT, accessManager, mockCatalogFramework, emailConfiguration);
RequestDescription requestDescription = orderRequest.get_request_description();
assertThat(requestDescription, notNullValue());
}
Aggregations