use of com.google.cloud.servicedirectory.v1.RegistrationServiceClient.ListNamespacesPagedResponse in project java-servicedirectory by googleapis.
the class NamespacesTests method tearDown.
@After
public void tearDown() throws Exception {
System.setOut(null);
bout.reset();
// Deletes any namespaces created during these tests.
try (RegistrationServiceClient client = RegistrationServiceClient.create()) {
// List the namespaces.
String locationPath = LocationName.format(PROJECT_ID, LOCATION_ID);
ListNamespacesPagedResponse response = client.listNamespaces(locationPath);
// Delete each namespace.
for (Namespace ns : response.iterateAll()) {
client.deleteNamespace(ns.getName());
}
}
}
use of com.google.cloud.servicedirectory.v1.RegistrationServiceClient.ListNamespacesPagedResponse in project java-servicedirectory by googleapis.
the class EndpointsTests method tearDown.
@After
public void tearDown() throws Exception {
System.setOut(null);
bout.reset();
// Deletes all resources created during these tests.
try (RegistrationServiceClient client = RegistrationServiceClient.create()) {
// List the namespaces.
String locationPath = LocationName.format(PROJECT_ID, LOCATION_ID);
ListNamespacesPagedResponse response = client.listNamespaces(locationPath);
// Delete each namespace.
for (Namespace namespace : response.iterateAll()) {
client.deleteNamespace(namespace.getName());
}
}
}
use of com.google.cloud.servicedirectory.v1.RegistrationServiceClient.ListNamespacesPagedResponse in project java-servicedirectory by googleapis.
the class ServicesTests method tearDown.
@After
public void tearDown() throws Exception {
System.setOut(null);
bout.reset();
// Deletes all resources created during these tests.
try (RegistrationServiceClient client = RegistrationServiceClient.create()) {
// List the namespaces.
String locationPath = LocationName.format(PROJECT_ID, LOCATION_ID);
ListNamespacesPagedResponse response = client.listNamespaces(locationPath);
// Delete each namespace.
for (Namespace namespace : response.iterateAll()) {
client.deleteNamespace(namespace.getName());
}
}
}
Aggregations