use of com.spectralogic.ds3autogen.net.model.client.PayloadCommand in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator_Test method toPayloadCommand_Test.
@Test
public void toPayloadCommand_Test() throws IOException {
final Ds3Request request = createTestRequestWithResponseCodes("com.test.WithPayloadRequest", true);
final PayloadCommand result = toPayloadCommand(request, getTestDocSpec());
assertThat(result.getCommandName(), is("WithPayload"));
assertThat(result.getRequestName(), is("WithPayloadRequest"));
assertThat(result.getResponseType(), is("WithPayloadResponse"));
}
use of com.spectralogic.ds3autogen.net.model.client.PayloadCommand in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator method toPayloadCommands.
/**
* Converts the Ds3Requests with a response type into Payload Commands
*/
protected static ImmutableList<PayloadCommand> toPayloadCommands(final ImmutableList<Ds3Request> ds3Requests, final Ds3DocSpec docSpec) {
final ImmutableList.Builder<PayloadCommand> builder = ImmutableList.builder();
final ImmutableList<Ds3Request> payloadRequests = getRequestsBasedOnResponsePayload(ds3Requests, true);
for (final Ds3Request ds3Request : payloadRequests) {
builder.add(toPayloadCommand(ds3Request, docSpec));
}
return builder.build();
}
Aggregations