Search in sources :

Example 1 with StructElement

use of com.spectralogic.ds3autogen.go.models.type.StructElement in project ds3_autogen by SpectraLogic.

the class BaseTypeGenerator_Test method toStructElementsList_FullList_Test.

@Test
public void toStructElementsList_FullList_Test() {
    final ImmutableList<StructElement> expectedElements = ImmutableList.of(new StructElement("ElementWithWrapper", "Type", "xml:\"OuterTag>InnerTag\""), new StructElement("ElementAsAttribute", "Type", "xml:\"ElementAsAttribute,attr\""), new StructElement("SimpleElement", "Type", "xml:\"SimpleElement\""));
    final ImmutableList<Ds3Element> elements = ImmutableList.of(elementWithWrapper, elementAsAttribute, simpleElement);
    final ImmutableList<StructElement> result = generator.toStructElementsList(elements);
    assertThat(result.size(), is(expectedElements.size()));
    expectedElements.forEach(expected -> assertThat(result, hasItem(expected)));
}
Also used : StructElement(com.spectralogic.ds3autogen.go.models.type.StructElement) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Aggregations

Ds3Element (com.spectralogic.ds3autogen.api.models.apispec.Ds3Element)1 StructElement (com.spectralogic.ds3autogen.go.models.type.StructElement)1 Test (org.junit.Test)1