use of com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest in project java-dlp by googleapis.
the class DlpServiceClientTest method hybridInspectJobTriggerTest2.
@Test
public void hybridInspectJobTriggerTest2() throws Exception {
HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build();
mockDlpService.addResponse(expectedResponse);
String name = "name3373707";
HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name);
Assert.assertEquals(expectedResponse, actualResponse);
List<AbstractMessage> actualRequests = mockDlpService.getRequests();
Assert.assertEquals(1, actualRequests.size());
HybridInspectJobTriggerRequest actualRequest = ((HybridInspectJobTriggerRequest) actualRequests.get(0));
Assert.assertEquals(name, actualRequest.getName());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
use of com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest in project java-dlp by googleapis.
the class DlpServiceClientTest method hybridInspectJobTriggerTest.
@Test
public void hybridInspectJobTriggerTest() throws Exception {
HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build();
mockDlpService.addResponse(expectedResponse);
JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name);
Assert.assertEquals(expectedResponse, actualResponse);
List<AbstractMessage> actualRequests = mockDlpService.getRequests();
Assert.assertEquals(1, actualRequests.size());
HybridInspectJobTriggerRequest actualRequest = ((HybridInspectJobTriggerRequest) actualRequests.get(0));
Assert.assertEquals(name.toString(), actualRequest.getName());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
Aggregations