use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_SpectraType_Test.
@Test
public void createNullableVariable_SpectraType_Test() {
final NetNullableVariable var = createNullableVariable("Name", "TestElementType", false, getTestTypeMap());
assertThat(var.getNetType(), is("TestElementType"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method convertGuidToString_Test.
@Test
public void convertGuidToString_Test() {
final NetNullableVariable guidVar = new NetNullableVariable("GuidVar", "Guid", true, true);
final NetNullableVariable guidResult = convertGuidToString(guidVar);
assertThat(guidResult.getType(), is("string"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toWithConstructorList_FullList_Test.
@Test
public void toWithConstructorList_FullList_Test() {
final ImmutableList<NetNullableVariable> vars = ImmutableList.of(new NetNullableVariable("GuidVar", "Guid", true, true), new NetNullableVariable("IntVar", "int", true, true));
final ImmutableList<WithConstructorVariable> result = toWithConstructorList(vars, "requestName", getTestDocSpec());
assertThat(result.size(), is(3));
assertThat(result.get(0).getName(), is("GuidVar"));
assertThat(result.get(0).getType(), is("Guid"));
assertThat(result.get(1).getName(), is("GuidVar"));
assertThat(result.get(1).getType(), is("string"));
assertThat(result.get(2).getName(), is("IntVar"));
assertThat(result.get(2).getType(), is("int"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toOptionalArgumentsList_FullList_Test.
@Test
public void toOptionalArgumentsList_FullList_Test() {
final ImmutableList<Ds3Param> params = ImmutableList.of(new Ds3Param("SimpleArg", "SimpleType", false), new Ds3Param("ArgWithPath", "com.test.TypeWithPath", false));
final ImmutableList<NetNullableVariable> result = generator.toOptionalArgumentsList(params, ImmutableMap.of());
assertThat(result.size(), is(2));
assertThat(result.get(0).getName(), is("SimpleArg"));
assertThat(result.get(0).getNetType(), is("SimpleType"));
assertThat(result.get(1).getName(), is("ArgWithPath"));
assertThat(result.get(1).getNetType(), is("TypeWithPath"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toNullableArgument_NullablePrimitive_Test.
@Test
public void toNullableArgument_NullablePrimitive_Test() {
final Ds3Param param = new Ds3Param("MyParam", "java.lang.Integer", true);
final NetNullableVariable result = toNullableArgument(param, ImmutableMap.of());
assertThat(result.getNetType(), is("int?"));
}
Aggregations