Search in sources :

Example 1 with DeleteEventsResponse

use of com.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse in project google-cloud-java by GoogleCloudPlatform.

the class ErrorStatsServiceClientTest method deleteEventsTest.

@Test
@SuppressWarnings("all")
public void deleteEventsTest() {
    DeleteEventsResponse expectedResponse = DeleteEventsResponse.newBuilder().build();
    mockErrorStatsService.addResponse(expectedResponse);
    ProjectName projectName = ProjectName.create("[PROJECT]");
    DeleteEventsResponse actualResponse = client.deleteEvents(projectName);
    Assert.assertEquals(expectedResponse, actualResponse);
    List<GeneratedMessageV3> actualRequests = mockErrorStatsService.getRequests();
    Assert.assertEquals(1, actualRequests.size());
    DeleteEventsRequest actualRequest = (DeleteEventsRequest) actualRequests.get(0);
    Assert.assertEquals(projectName, actualRequest.getProjectNameAsProjectName());
}
Also used : ProjectName(com.google.devtools.clouderrorreporting.v1beta1.ProjectName) DeleteEventsResponse(com.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse) DeleteEventsRequest(com.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) Test(org.junit.Test)

Aggregations

DeleteEventsRequest (com.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest)1 DeleteEventsResponse (com.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse)1 ProjectName (com.google.devtools.clouderrorreporting.v1beta1.ProjectName)1 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)1 Test (org.junit.Test)1