use of com.spectralogic.ds3autogen.go.models.request.VariableInterface in project ds3_autogen by SpectraLogic.
the class PutObjectRequestGenerator_Test method toStructAssignmentParams_Test.
@Test
public void toStructAssignmentParams_Test() {
final ImmutableList<VariableInterface> expectedVars = ImmutableList.of(new SimpleVariable("bucketName"), new SimpleVariable("objectName"), new SimpleVariable("content"), new Variable("checksum", "networking.NewNoneChecksum()"), new Variable("headers", "&http.Header{}"));
final ImmutableList<VariableInterface> result = generator.toStructAssignmentParams(getRequestCreateObject());
assertThat(result.size(), is(expectedVars.size()));
expectedVars.forEach(expected -> assertThat(result, hasItem(expected)));
}
use of com.spectralogic.ds3autogen.go.models.request.VariableInterface in project ds3_autogen by SpectraLogic.
the class RequiredObjectsPayloadGenerator_Test method toStructAssignmentParamsTest.
@Test
public void toStructAssignmentParamsTest() {
final ImmutableList<VariableInterface> expected = ImmutableList.of(new SimpleVariable("bucketName"), new Variable("content", "buildDs3ObjectListStream(objects)"));
final ImmutableList<VariableInterface> result = generator.toStructAssignmentParams(testRequest);
assertThat(result.size(), is(expected.size()));
expected.forEach(var -> assertThat(result, hasItem(var)));
}
use of com.spectralogic.ds3autogen.go.models.request.VariableInterface in project ds3_autogen by SpectraLogic.
the class GetObjectRequestGenerator_Test method toStructAssignmentParams_Test.
@Test
public void toStructAssignmentParams_Test() {
final ImmutableList<VariableInterface> expectedVars = ImmutableList.of(new SimpleVariable("bucketName"), new SimpleVariable("objectName"), new Variable("checksum", "networking.NewNoneChecksum()"));
final ImmutableList<VariableInterface> result = generator.toStructAssignmentParams(getRequestAmazonS3GetObject());
assertThat(result.size(), is(expectedVars.size()));
expectedVars.forEach(expected -> assertThat(result, hasItem(expected)));
}
Aggregations