use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Param 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.api.models.apispec.Ds3Param 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.api.models.apispec.Ds3Param in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toNullableArgument_NonNullablePrimitive_Test.
@Test
public void toNullableArgument_NonNullablePrimitive_Test() {
//Note: optional parameters are always nullable
final Ds3Param param = new Ds3Param("MyParam", "java.lang.Integer", false);
final NetNullableVariable result = toNullableArgument(param, ImmutableMap.of());
assertThat(result.getNetType(), is("int?"));
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Param in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toNullableArgument_NullableSpectraType_Test.
@Test
public void toNullableArgument_NullableSpectraType_Test() {
final Ds3Param param = new Ds3Param("MyParam", "com.spectra.TestType", true);
final NetNullableVariable result = toNullableArgument(param, ImmutableMap.of());
assertThat(result.getNetType(), is("TestType"));
}
Aggregations