use of org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testMultipleUncompressedOrder.
@Test
public void testMultipleUncompressedOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testMultipleTarCompressOrder.
@Test
public void testMultipleTarCompressOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testNoProduct.
@Test(expected = BAD_OPERATION.class)
public void testNoProduct() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.prod_list = null;
OrderRequestImpl orderRequest = new OrderRequestImpl(order, accessManager, mockCatalogFramework, destination -> Optional.of(mock(DestinationSink.class)));
DeliveryManifestHolder holder = new DeliveryManifestHolder();
orderRequest.complete(holder);
}
use of org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testSingleUncompressedOrder.
@Test
public void testSingleUncompressedOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
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 testNoPSpec.
@Test
public void testNoPSpec() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec = null;
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));
}
Aggregations