Search in sources :

Example 6 with Struct

use of com.spectralogic.ds3autogen.c.models.Struct in project ds3_autogen by SpectraLogic.

the class StructConverter_Test method testConvertNameToMarshallSetValid.

@Test
public void testConvertNameToMarshallSetValid() throws ParseException {
    final Ds3Element testElement1 = new Ds3Element("BoolElement", "boolean", null, false);
    final Ds3Element testElement2 = new Ds3Element("BeanElement", "com.spectralogic.s3.server.domain.UserApiBean", null, false);
    final ImmutableList<Ds3Element> elementsList = ImmutableList.of(testElement1, testElement2);
    final Ds3Type ds3Type = new Ds3Type("testDs3Type", "testDs3TypeMarshallName", elementsList, ImmutableList.of());
    final Struct testStruct = StructConverter.toStruct(ds3Type, ImmutableSet.of(), ImmutableSet.of(), ImmutableSet.of(), ImmutableSet.of(), ImmutableSet.of());
    assertThat(testStruct.getNameToMarshall(), is("testDs3TypeMarshallName"));
}
Also used : Ds3Type(com.spectralogic.ds3autogen.api.models.apispec.Ds3Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Struct(com.spectralogic.ds3autogen.c.models.Struct) Test(org.junit.Test)

Aggregations

Struct (com.spectralogic.ds3autogen.c.models.Struct)6 Test (org.junit.Test)5 Ds3Element (com.spectralogic.ds3autogen.api.models.apispec.Ds3Element)4 Ds3Type (com.spectralogic.ds3autogen.api.models.apispec.Ds3Type)4 ImmutableList (com.google.common.collect.ImmutableList)1 Ds3SpecParserImpl (com.spectralogic.ds3autogen.Ds3SpecParserImpl)1 Ds3SpecParser (com.spectralogic.ds3autogen.api.Ds3SpecParser)1 Ds3ApiSpec (com.spectralogic.ds3autogen.api.models.apispec.Ds3ApiSpec)1 Enum (com.spectralogic.ds3autogen.c.models.Enum)1 Request (com.spectralogic.ds3autogen.c.models.Request)1 Source (com.spectralogic.ds3autogen.c.models.Source)1 Ds3DocSpecEmptyImpl (com.spectralogic.ds3autogen.docspec.Ds3DocSpecEmptyImpl)1 TestFileUtilsImpl (com.spectralogic.ds3autogen.utils.TestFileUtilsImpl)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ParseException (java.text.ParseException)1 HashSet (java.util.HashSet)1 LinkedList (java.util.LinkedList)1