Search in sources :

Example 1 with C_Type

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

the class C_Type_Test method testStructMemberTypeUuidToString.

@Test
public void testStructMemberTypeUuidToString() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("uuidElement", "java.util.UUID", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("ds3_str"));
    assertThat(c_type.toString(), is("ds3_str*"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 2 with C_Type

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

the class C_Type_Test method testStructTypeDs3ResponseToString.

@Test
public void testStructTypeDs3ResponseToString() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("BuildInformation", "com.spectralogic.s3.common.platform.lang.BuildInformation", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("ds3_build_information_response"));
    assertThat(c_type.toString(), is("ds3_build_information_response*"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 3 with C_Type

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

the class C_Type_Test method testStructMemberTypeStringToString.

@Test
public void testStructMemberTypeStringToString() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("stringElement", "java.lang.String", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("ds3_str"));
    assertThat(c_type.toString(), is("ds3_str*"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 4 with C_Type

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

the class C_Type_Test method testStructTypeIntToString2.

@Test
public void testStructTypeIntToString2() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("intStruct2", "java.lang.Integer", null, true);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("int"));
    assertThat(c_type.toString(), is("int"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 5 with C_Type

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

the class C_Type_Test method testStructMemberTypeDoubleToString.

@Test
public void testStructMemberTypeDoubleToString() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("doubleElement", "double", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("float"));
    assertThat(c_type.toString(), is("float"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Aggregations

Ds3Element (com.spectralogic.ds3autogen.api.models.apispec.Ds3Element)10 C_Type (com.spectralogic.ds3autogen.c.models.C_Type)10 Test (org.junit.Test)10