use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Type in project ds3_autogen by SpectraLogic.
the class BaseTypeParserSetGenerator_Test method getTypeParserGenerator_Test.
@Test
public void getTypeParserGenerator_Test() {
final Ds3Type jobsList = createDs3TypeTestData("com.spectralogic.s3.server.domain.TestType");
final TypeParserGenerator<?> result = getTypeParserGenerator(jobsList);
assertThat(result, instanceOf(BaseTypeParserGenerator.class));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Type in project ds3_autogen by SpectraLogic.
the class BaseTypeGenerator_Test method getAllImports_NonEnumType_Test.
@Test
public void getAllImports_NonEnumType_Test() {
final ImmutableList<Ds3Element> ds3Elements = ImmutableList.of(new Ds3Element("ElementName1", "com.spectralogic.test.ElementType1", "ElementComponentType1", false), new Ds3Element("ElementName2", "ElementType2", "com.spectralogic.test.ElementComponentType2", false), new Ds3Element("ElementName3", "ElementType3", null, false));
final Ds3Type ds3Type = new Ds3Type("TypeName", null, ds3Elements, null);
final ImmutableList<String> result = generator.getAllImports(ds3Type);
assertThat(result.size(), is(3));
assertTrue(result.contains("java.util.List"));
assertTrue(result.contains("java.util.ArrayList"));
assertTrue(result.contains("com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper"));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Type in project ds3_autogen by SpectraLogic.
the class BaseTypeGenerator_Test method toNameToMarshal_Value_Test.
@Test
public void toNameToMarshal_Value_Test() {
final Ds3Type type = new Ds3Type("Name", "Objects", null, null);
final String result = generator.toNameToMarshal(type);
assertThat(result, is("Objects"));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Type in project ds3_autogen by SpectraLogic.
the class BaseTypeGenerator_Test method toNameToMarshal_NullValue_Test.
@Test
public void toNameToMarshal_NullValue_Test() {
final Ds3Type type = new Ds3Type("Name", null, null, null);
final String result = generator.toNameToMarshal(type);
assertThat(result, is(nullValue()));
}
Aggregations