Search in sources :

Example 6 with OrderContents

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));
}
Also used : OrderContents(org.codice.alliance.nsili.common.GIAS.OrderContents) DeliveryManifestHolder(org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder) Test(org.junit.Test)

Example 7 with OrderContents

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));
}
Also used : OrderContents(org.codice.alliance.nsili.common.GIAS.OrderContents) DeliveryManifestHolder(org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder) Test(org.junit.Test)

Example 8 with OrderContents

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));
}
Also used : OrderContents(org.codice.alliance.nsili.common.GIAS.OrderContents) DeliveryManifestHolder(org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder) Test(org.junit.Test)

Example 9 with OrderContents

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));
}
Also used : OrderContents(org.codice.alliance.nsili.common.GIAS.OrderContents) DeliveryManifestHolder(org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder) Test(org.junit.Test)

Example 10 with OrderContents

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());
}
Also used : OrderContents(org.codice.alliance.nsili.common.GIAS.OrderContents) RequestDescription(org.codice.alliance.nsili.common.UCO.RequestDescription) Test(org.junit.Test)

Aggregations

OrderContents (org.codice.alliance.nsili.common.GIAS.OrderContents)31 Test (org.junit.Test)26 DeliveryManifestHolder (org.codice.alliance.nsili.common.GIAS.DeliveryManifestHolder)22 DeliveryDetails (org.codice.alliance.nsili.common.GIAS.DeliveryDetails)6 PackagingSpec (org.codice.alliance.nsili.common.GIAS.PackagingSpec)4 ProductDetails (org.codice.alliance.nsili.common.GIAS.ProductDetails)4 Any (org.omg.CORBA.Any)3 Calendar (java.util.Calendar)2 AlterationSpec (org.codice.alliance.nsili.common.GIAS.AlterationSpec)2 Destination (org.codice.alliance.nsili.common.GIAS.Destination)2 ImageSpec (org.codice.alliance.nsili.common.GIAS.ImageSpec)2 MediaType (org.codice.alliance.nsili.common.GIAS.MediaType)2 TailoringSpec (org.codice.alliance.nsili.common.GIAS.TailoringSpec)2 AbsTime (org.codice.alliance.nsili.common.UCO.AbsTime)2 Coordinate2d (org.codice.alliance.nsili.common.UCO.Coordinate2d)2 Date (org.codice.alliance.nsili.common.UCO.Date)2 NameName (org.codice.alliance.nsili.common.UCO.NameName)2 Rectangle (org.codice.alliance.nsili.common.UCO.Rectangle)2 Time (org.codice.alliance.nsili.common.UCO.Time)2 IOException (java.io.IOException)1