@Test public void shouldDeleteSasLogicalInterconnectGroup() { client.delete(ANY_RESOURCE_ID, TaskTimeout.of(321)); String expectedUri = SAS_LOGICAL_INTERCONNECT_GROUP_URI + "/" + ANY_RESOURCE_ID; Request expectedRequest = new Request(HttpMethod.DELETE, expectedUri); expectedRequest.setTimeout(321); then(baseClient).should().executeMonitorableRequest(expectedRequest); }
@Test public void shouldCreateSasLogicalInterconnectGroup() { SasLogicalInterconnectGroup group = new SasLogicalInterconnectGroup(); client.create(group, TaskTimeout.of(321)); Request expectedRequest = new Request(HttpMethod.POST, SAS_LOGICAL_INTERCONNECT_GROUP_URI, group); expectedRequest.setTimeout(321); then(baseClient).should().executeMonitorableRequest(expectedRequest); }
@Test public void shouldExtractBundle() { client.extractBundle(ANY_RESOURCE_ID, TaskTimeout.of(123)); String expectedUri = ARTIFACTS_BUNDLE_URI + "/" + ANY_RESOURCE_ID; Request expectedRequest = new Request(HttpMethod.PUT, expectedUri, ""); expectedRequest.setContentType(ContentType.TEXT_PLAIN); expectedRequest.setTimeout(123); then(baseClient).should().executeMonitorableRequest(expectedRequest); }
@Test public void shouldCreateBackupBundle() { UserBackupParams userBackupParams = new UserBackupParams(); client.createBackupBundle(userBackupParams, TaskTimeout.of(123)); String expectedUri = ARTIFACTS_BUNDLE_URI + ARTIFACTS_BUNDLE_BACKUPS_URI; Request expectedRequest = new Request(HttpMethod.POST, expectedUri, userBackupParams); expectedRequest.setTimeout(123); then(baseClient).should().executeMonitorableRequest(expectedRequest); }
@Test public void shouldCreateArtifactsBundle() { CreateArtifactsBundle artifactsBundle = new CreateArtifactsBundle(); client.create(artifactsBundle, TaskTimeout.of(123)); Request expectedRequest = new Request(HttpMethod.POST, ARTIFACTS_BUNDLE_URI, artifactsBundle); expectedRequest.setTimeout(123); then(baseClient).should().executeMonitorableRequest(expectedRequest); }
@Test public void shouldExtractBackupBundle() { UserBackupParams userBackupParams = new UserBackupParams(); client.extractBackupBundle(ANY_RESOURCE_ID, userBackupParams, TaskTimeout.of(123)); String expectedUri = ARTIFACTS_BUNDLE_URI + ARTIFACTS_BUNDLE_BACKUPS_URI + "/" + ANY_RESOURCE_ID; Request expectedRequest = new Request(HttpMethod.PUT, expectedUri, userBackupParams); expectedRequest.setTimeout(123); then(baseClient).should().executeMonitorableRequest(expectedRequest); }