use of com.google.devtools.clouderrorreporting.v1beta1.ProjectName in project google-cloud-java by GoogleCloudPlatform.
the class SubscriptionAdminClientTest method listSubscriptionsExceptionTest.
@Test
@SuppressWarnings("all")
public void listSubscriptionsExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockSubscriber.addException(exception);
try {
ProjectName project = ProjectName.create("[PROJECT]");
client.listSubscriptions(project);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}
Aggregations