Search in sources :

Example 1 with VoidCommand

use of com.spectralogic.ds3autogen.net.model.client.VoidCommand in project ds3_autogen by SpectraLogic.

the class BaseClientGenerator_Test method toVoidCommand_Test.

@Test
public void toVoidCommand_Test() throws IOException {
    final Ds3Request request = createTestRequestWithResponseCodes("com.test.WithoutPayloadRequest", false);
    final VoidCommand result = toVoidCommand(request, getTestDocSpec());
    assertThat(result.getCommandName(), is("WithoutPayload"));
    assertThat(result.getRequestName(), is("WithoutPayloadRequest"));
    assertThat(result.getResponseType(), is("void"));
}
Also used : VoidCommand(com.spectralogic.ds3autogen.net.model.client.VoidCommand) Ds3Request(com.spectralogic.ds3autogen.api.models.apispec.Ds3Request) Test(org.junit.Test)

Example 2 with VoidCommand

use of com.spectralogic.ds3autogen.net.model.client.VoidCommand in project ds3_autogen by SpectraLogic.

the class BaseClientGenerator method toVoidCommands.

/**
     * Converts the Ds3Requests with no response type into Void Commands
     */
protected static ImmutableList<VoidCommand> toVoidCommands(final ImmutableList<Ds3Request> ds3Requests, final Ds3DocSpec docSpec) {
    final ImmutableList.Builder<VoidCommand> builder = ImmutableList.builder();
    final ImmutableList<Ds3Request> voidRequests = getRequestsBasedOnResponsePayload(ds3Requests, false);
    for (final Ds3Request ds3Request : voidRequests) {
        builder.add(toVoidCommand(ds3Request, docSpec));
    }
    return builder.build();
}
Also used : ImmutableList(com.google.common.collect.ImmutableList) VoidCommand(com.spectralogic.ds3autogen.net.model.client.VoidCommand) Ds3Request(com.spectralogic.ds3autogen.api.models.apispec.Ds3Request)

Aggregations

Ds3Request (com.spectralogic.ds3autogen.api.models.apispec.Ds3Request)2 VoidCommand (com.spectralogic.ds3autogen.net.model.client.VoidCommand)2 ImmutableList (com.google.common.collect.ImmutableList)1 Test (org.junit.Test)1