use of org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testMultipleTarZipOrder.
@Test
public void testMultipleTarZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getMultipleUncompressedTestOrder();
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 testUnsetDestName.
@Test
public void testUnsetDestName() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
order.pSpec.package_identifier = null;
DeliveryDetails deliveryDetail = new DeliveryDetails();
deliveryDetail.dests = getBadHttpDestination();
order.del_list = new DeliveryDetails[] { deliveryDetail };
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 testSingleTarGZipOrder.
@Test
public void testSingleTarGZipOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
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.DeliveryManifestHolder in project alliance by codice.
the class OrderRequestImplTest method testSupportedEmailDelivery.
@Test
public void testSupportedEmailDelivery() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
DeliveryDetails deliveryDetail = new DeliveryDetails();
deliveryDetail.dests = getGoodEmailDestination();
order.del_list = new DeliveryDetails[] { deliveryDetail };
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 testSingleTarUncompressedOrder.
@Test
public void testSingleTarUncompressedOrder() throws SystemFault, ProcessingFault {
OrderContents order = getUncompressedTestOrder();
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));
}
Aggregations