use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toNullableArgument_NullableEnumType_Test.
@Test
public void toNullableArgument_NullableEnumType_Test() {
final Ds3Type testType = new Ds3Type("com.spectra.TestType", "", null, createEmptyDs3EnumConstantList());
final ImmutableMap<String, Ds3Type> testTypeMap = ImmutableMap.of(testType.getName(), testType);
final Ds3Param param = new Ds3Param("MyParam", testType.getName(), true);
final NetNullableVariable result = toNullableArgument(param, testTypeMap);
assertThat(result.getNetType(), is("TestType?"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BulkGetRequestGenerator_Test method toOptionalArgumentsList_FullList_Test.
@Test
public void toOptionalArgumentsList_FullList_Test() {
final ImmutableList<Ds3Param> params = ImmutableList.of(new Ds3Param("IntArg", "int", false), new Ds3Param("StringArg", "java.lang.String", true), new Ds3Param("ChunkClientProcessingOrderGuarantee", "com.spectralogic.s3.common.dao.domain.ds3.JobChunkClientProcessingOrderGuarantee", false));
final ImmutableList<NetNullableVariable> result = generator.toOptionalArgumentsList(params, ImmutableMap.of());
assertThat(result.size(), is(2));
assertThat(result.get(0).getName(), is("IntArg"));
assertThat(result.get(0).getNetType(), is("int?"));
assertThat(result.get(1).getName(), is("StringArg"));
assertThat(result.get(1).getNetType(), is("string"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BulkPutRequestGenerator_Test method toOptionalArgumentsList_FullList_Test.
@Test
public void toOptionalArgumentsList_FullList_Test() {
final ImmutableList<Ds3Param> params = ImmutableList.of(new Ds3Param("MaxUploadSize", "long", false), new Ds3Param("MaxUploads", "int", false), new Ds3Param("Prefix", "java.lang.String", true));
final ImmutableList<NetNullableVariable> result = generator.toOptionalArgumentsList(params, ImmutableMap.of());
assertThat(result.size(), is(2));
assertThat(result.get(0).getName(), is("MaxUploads"));
assertThat(result.get(1).getName(), is("Prefix"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class GetObjectRequestGenerator_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(0));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_NullablePrimitive_Test.
@Test
public void createNullableVariable_NullablePrimitive_Test() {
final NetNullableVariable var = createNullableVariable("Name", "java.lang.Integer", true, null);
assertThat(var.getNetType(), is("int?"));
}
Aggregations