use of org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testMultipleFilesZipOrder.
@Test
public void testMultipleFilesZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.FILESZIP.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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testMultipleTarUncompressedOrder.
@Test
public void testMultipleTarUncompressedOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.TARUNC.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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testSingleCompressedOrder.
@Test
public void testSingleCompressedOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.FILESCOMPRESS.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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testSingleTarZipOrder.
@Test
public void testSingleTarZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec.packaging_format_and_compression = PackagingSpecFormatType.TARZIP.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.DeliveryManifestHolder 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));
}
Aggregations