use of com.spectralogic.ds3autogen.java.models.CustomCommand in project ds3_autogen by SpectraLogic.
the class ClientConverter_Test method toCustomCommand_Test.
@Test
public void toCustomCommand_Test() {
final CustomCommand result = toCustomCommand(getRequestAmazonS3GetObject(), getTestDocSpec());
assertThat(result.getName(), is("GetObjectHandler"));
}
use of com.spectralogic.ds3autogen.java.models.CustomCommand in project ds3_autogen by SpectraLogic.
the class ClientConverter_Test method toGetObjectAmazonS3CustomCommand_Test.
@Test
public void toGetObjectAmazonS3CustomCommand_Test() {
final String expectedDocs = "/**\n" + " * This is how you use get object\n" + " */";
final String expectedBody = "return new GetObjectResponseHandlerParser(\n" + " request.getChannel(),\n" + " this.netClient.getConnectionDetails().getBufferSize(),\n" + " request.getObjectName())\n" + " .response(this.netClient.getResponse(request));";
final CustomCommand result = toGetObjectAmazonS3CustomCommand(getRequestAmazonS3GetObject(), getTestDocSpec());
assertThat(result.getName(), is("GetObjectHandler"));
assertThat(result.getRequestName(), is("GetObjectRequestHandler"));
assertThat(result.getResponseName(), is("GetObjectResponseHandler"));
assertThat(result.getDocumentation(), is(expectedDocs));
assertThat(result.getAnnotationInfo(), is(nullValue()));
assertThat(result.getCustomBody(), is(expectedBody));
}
Aggregations