use of com.spectralogic.ds3autogen.api.models.Arguments in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toConstructorParamsList_Test.
@Test
public void toConstructorParamsList_Test() {
final ImmutableList<Arguments> expectedArgs = ImmutableList.of(new Arguments("string", "bucketName"), new Arguments("string", "objectName"), new Arguments("string", "activeJobId"), new Arguments("int", "intReqParam"), new Arguments("string", "stringReqParam"));
final ImmutableList<Arguments> result = generator.toConstructorParamsList(testRequest);
assertThat(result.size(), is(expectedArgs.size()));
for (int i = 0; i < result.size(); i++) {
assertThat(result.get(i).getName(), is(expectedArgs.get(i).getName()));
assertThat(result.get(i).getType(), is(expectedArgs.get(i).getType()));
}
}
use of com.spectralogic.ds3autogen.api.models.Arguments in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method structParamsFromRequest_Test.
@Test
public void structParamsFromRequest_Test() {
// Not sorted
final ImmutableList<Arguments> expectedArgs = ImmutableList.of(new Arguments("string", "bucketName"), new Arguments("string", "objectName"), new Arguments("string", "activeJobId"), new Arguments("int", "intReqParam"), new Arguments("string", "stringReqParam"), new Arguments("int", "intOptParam"), new Arguments("*int", "integerOptParam"), new Arguments("string", "stringOptParam"));
final ImmutableList<Arguments> result = generator.structParamsFromRequest(testRequest);
assertThat(result.size(), is(expectedArgs.size()));
for (int i = 0; i < result.size(); i++) {
assertThat(result.get(i).getName(), is(expectedArgs.get(i).getName()));
assertThat(result.get(i).getType(), is(expectedArgs.get(i).getType()));
}
}
use of com.spectralogic.ds3autogen.api.models.Arguments in project ds3_autogen by SpectraLogic.
the class DeleteObjectsRequestGenerator_Test method getPayloadConstructorArgTest.
@Test
public void getPayloadConstructorArgTest() {
final Arguments result = generator.getPayloadConstructorArg();
assertThat(result.getName(), is("objectNames"));
assertThat(result.getType(), is("[]string"));
}
use of com.spectralogic.ds3autogen.api.models.Arguments in project ds3_autogen by SpectraLogic.
the class GetObjectRequestGenerator_Test method toStructParams_Test.
@Test
public void toStructParams_Test() {
final ImmutableList<Arguments> expectedArgs = ImmutableList.of(new Arguments("string", "bucketName"), new Arguments("string", "objectName"), new Arguments("networking.Checksum", "checksum"), new Arguments("string", "job"), new Arguments("int64", "offset"), new Arguments("*rangeHeader", "rangeHeader"));
final ImmutableList<Arguments> result = generator.toStructParams(getRequestAmazonS3GetObject());
assertThat(result.size(), is(expectedArgs.size()));
for (int i = 0; i < result.size(); i++) {
assertThat(result.get(i).getName(), is(expectedArgs.get(i).getName()));
assertThat(result.get(i).getType(), is(expectedArgs.get(i).getType()));
}
}
use of com.spectralogic.ds3autogen.api.models.Arguments in project ds3_autogen by SpectraLogic.
the class MultipartUploadPayloadGenerator_Test method getPayloadConstructorArgTest.
@Test
public void getPayloadConstructorArgTest() {
final Arguments result = generator.getPayloadConstructorArg();
assertThat(result.getName(), is("parts"));
assertThat(result.getType(), is("[]Part"));
}
Aggregations