use of com.google.spanner.admin.database.v1.DeleteBackupRequest in project java-spanner by googleapis.
the class DatabaseAdminClientTest method deleteBackupTest.
@Test
public void deleteBackupTest() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockDatabaseAdmin.addResponse(expectedResponse);
BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]");
client.deleteBackup(name);
List<AbstractMessage> actualRequests = mockDatabaseAdmin.getRequests();
Assert.assertEquals(1, actualRequests.size());
DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0));
Assert.assertEquals(name.toString(), actualRequest.getName());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
Aggregations