use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation in project ds3_autogen by SpectraLogic.
the class Ds3ElementUtil_Test method getXmlTagFromAnnotation_NonCustomName_Test.
@Test
public void getXmlTagFromAnnotation_NonCustomName_Test() {
final Ds3Annotation annotation = createNonCustomMarshaledNameAnnotation();
final String result = getXmlTagFromAnnotation(annotation);
assertThat(result, CoreMatchers.is(""));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation in project ds3_autogen by SpectraLogic.
the class BaseTypeGenerator_Test method toElementList_Jobs_Test.
@Test
public void toElementList_Jobs_Test() {
final ImmutableList<Ds3AnnotationElement> annotations = ImmutableList.of(new Ds3AnnotationElement("CollectionValue", "Jobs", "java.lang.String"), new Ds3AnnotationElement("CollectionValueRenderingMode", "SINGLE_BLOCK_FOR_ALL_ELEMENTS", "com.spectralogic.util.marshal.CustomMarshaledName$CollectionNameRenderingMode"), new Ds3AnnotationElement("Value", "Job", "java.lang.String"));
final Ds3Element jobs = new Ds3Element("Jobs", "array", "com.spectralogic.s3.server.domain.Job", ImmutableList.of(new Ds3Annotation("com.spectralogic.util.marshal.CustomMarshaledName", annotations)), false);
final Ds3Type jobApiBean = createDs3TypeTestData("com.spectralogic.s3.server.domain.Job");
final TypeElementList result = toElementList(jobs, ImmutableMap.of(jobApiBean.getName(), jobApiBean));
assertThat(result.toPythonCode(), is("('Job', None, Job())"));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation in project ds3_autogen by SpectraLogic.
the class Ds3ElementUtil_Test method toElementAsAttribute_MarshalXmlAsAttribute_Test.
@Test
public void toElementAsAttribute_MarshalXmlAsAttribute_Test() {
final ImmutableList<Ds3Annotation> annotations = ImmutableList.of(new Ds3Annotation("com.spectralogic.util.marshal.MarshalXmlAsAttribute", null));
assertThat(isAttribute(annotations), is(true));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation in project ds3_autogen by SpectraLogic.
the class Ds3ElementUtil_Test method getXmlTagFromAnnotation_SimpleName_Test.
@Test
public void getXmlTagFromAnnotation_SimpleName_Test() {
final Ds3Annotation annotation = createSimpleNameAnnotation();
final String result = getXmlTagFromAnnotation(annotation);
assertThat(result, CoreMatchers.is(""));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation in project ds3_autogen by SpectraLogic.
the class Ds3ElementUtil_Test method getXmlTagName_Test.
@Test
public void getXmlTagName_Test() {
final ImmutableList<Ds3Annotation> annotations = ImmutableList.of(createSimpleNameAnnotation(), createNonCustomMarshaledNameAnnotation(), createCustomMarshaledNameAnnotation());
final Ds3Element element = new Ds3Element("ElementName", "Type", "ComponentType", annotations, false);
final String result = getXmlTagName(element);
assertThat(result, CoreMatchers.is("Error"));
}
Aggregations