Search in sources :

Example 1 with RequestDescriptor

use of com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor in project ds3_autogen by SpectraLogic.

the class DocSpecConverter_Test method createSpectraRequestDescriptor.

private static RequestDescriptor createSpectraRequestDescriptor() {
    final RequestDescriptor requestDescriptor = new RequestDescriptor();
    requestDescriptor.setName(SPECTRA_NAME_BEFORE);
    requestDescriptor.setClassification(Classification.spectrads3);
    requestDescriptor.setDescription(SPECTRA_DESCRIPTOR);
    return requestDescriptor;
}
Also used : RequestDescriptor(com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor)

Example 2 with RequestDescriptor

use of com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor in project ds3_autogen by SpectraLogic.

the class DocSpecConverter_Test method createAmazonRequestDescriptor.

private static RequestDescriptor createAmazonRequestDescriptor() {
    final RequestDescriptor requestDescriptor = new RequestDescriptor();
    requestDescriptor.setName(AMAZON_NAME_BEFORE);
    requestDescriptor.setClassification(Classification.amazons3);
    requestDescriptor.setDescription(AMAZON_DESCRIPTOR);
    return requestDescriptor;
}
Also used : RequestDescriptor(com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor)

Example 3 with RequestDescriptor

use of com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor in project ds3_autogen by SpectraLogic.

the class DocSpecConverter_Test method toRequestDocs_Test.

@Test
public void toRequestDocs_Test() throws IOException {
    final NameMapper nameMapper = new NameMapper(TEST_NAME_MAPPER_FILE);
    final ImmutableList<RequestDescriptor> rds = ImmutableList.of(createAmazonRequestDescriptor(), createSpectraRequestDescriptor());
    final ImmutableMap<String, String> result = toRequestDocs(rds, nameMapper);
    assertThat(result.size(), is(2));
    assertThat(result.get(AMAZON_NAME_AFTER), is(AMAZON_DESCRIPTOR));
    assertThat(result.get(SPECTRA_NAME_AFTER), is(SPECTRA_DESCRIPTOR));
}
Also used : NameMapper(com.spectralogic.ds3autogen.NameMapper) RequestDescriptor(com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor) Test(org.junit.Test)

Aggregations

RequestDescriptor (com.spectralogic.ds3autogen.models.xml.docspec.RequestDescriptor)3 NameMapper (com.spectralogic.ds3autogen.NameMapper)1 Test (org.junit.Test)1