use of com.google.bigtable.admin.v2.DeleteSnapshotRequest in project gapic-generator-java by googleapis.
the class SubscriptionAdminClientTest method deleteSnapshotTest.
@Test
public void deleteSnapshotTest() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockSubscriber.addResponse(expectedResponse);
SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
client.deleteSnapshot(snapshot);
List<AbstractMessage> actualRequests = mockSubscriber.getRequests();
Assert.assertEquals(1, actualRequests.size());
DeleteSnapshotRequest actualRequest = ((DeleteSnapshotRequest) actualRequests.get(0));
Assert.assertEquals(snapshot.toString(), actualRequest.getSnapshot());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
use of com.google.bigtable.admin.v2.DeleteSnapshotRequest in project gapic-generator-java by googleapis.
the class SubscriptionAdminClientTest method deleteSnapshotTest2.
@Test
public void deleteSnapshotTest2() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockSubscriber.addResponse(expectedResponse);
String snapshot = "snapshot284874180";
client.deleteSnapshot(snapshot);
List<AbstractMessage> actualRequests = mockSubscriber.getRequests();
Assert.assertEquals(1, actualRequests.size());
DeleteSnapshotRequest actualRequest = ((DeleteSnapshotRequest) actualRequests.get(0));
Assert.assertEquals(snapshot, actualRequest.getSnapshot());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
Aggregations