use of com.spectralogic.ds3autogen.go.models.client.Command in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator_Test method toCommandList_HttpRedirectFalse_Test.
@Test
public void toCommandList_HttpRedirectFalse_Test() {
final ImmutableList<Command> expected = ImmutableList.of(new Command("DeleteBucketHandler"), new Command("CreateGetJobHandler"));
final ImmutableList<Ds3Request> requests = ImmutableList.of(getBucketsRequest(), deleteBucketRequest(), getObjectsDetailsRequest(), getRequestBulkGet());
final ImmutableList<Command> result = generator.toCommandList(requests, false);
assertThat(result.size(), is(expected.size()));
expected.forEach(cmd -> assertThat(result, hasItem(cmd)));
}
use of com.spectralogic.ds3autogen.go.models.client.Command in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator_Test method toCommand_Test.
@Test
public void toCommand_Test() {
final Command expected = new Command("GetBucketHandler");
assertThat(generator.toCommand(getBucketRequest()), is(expected));
}
use of com.spectralogic.ds3autogen.go.models.client.Command in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator_Test method toCommandList_HttpRedirectTrue_Test.
@Test
public void toCommandList_HttpRedirectTrue_Test() {
final ImmutableList<Command> expected = ImmutableList.of(new Command("GetBucketsHandler"), new Command("GetObjectsHandler"));
final ImmutableList<Ds3Request> requests = ImmutableList.of(getBucketsRequest(), deleteBucketRequest(), getObjectsDetailsRequest(), getRequestBulkGet());
final ImmutableList<Command> result = generator.toCommandList(requests, true);
assertThat(result.size(), is(expected.size()));
expected.forEach(cmd -> assertThat(result, hasItem(cmd)));
}
Aggregations