use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class InterconnectLocationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonInterconnectLocationsStub.getMethodDescriptors(), InterconnectLocationsSettings.getDefaultEndpoint());
InterconnectLocationsSettings settings = InterconnectLocationsSettings.newBuilder().setTransportChannelProvider(InterconnectLocationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = InterconnectLocationsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class MachineImagesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonMachineImagesStub.getMethodDescriptors(), MachineImagesSettings.getDefaultEndpoint());
MachineImagesSettings settings = MachineImagesSettings.newBuilder().setTransportChannelProvider(MachineImagesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = MachineImagesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class BackendServicesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonBackendServicesStub.getMethodDescriptors(), BackendServicesSettings.getDefaultEndpoint());
BackendServicesSettings settings = BackendServicesSettings.newBuilder().setTransportChannelProvider(BackendServicesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = BackendServicesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class DisksClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonDisksStub.getMethodDescriptors(), DisksSettings.getDefaultEndpoint());
DisksSettings settings = DisksSettings.newBuilder().setTransportChannelProvider(DisksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = DisksClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ExternalVpnGatewaysClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonExternalVpnGatewaysStub.getMethodDescriptors(), ExternalVpnGatewaysSettings.getDefaultEndpoint());
ExternalVpnGatewaysSettings settings = ExternalVpnGatewaysSettings.newBuilder().setTransportChannelProvider(ExternalVpnGatewaysSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ExternalVpnGatewaysClient.create(settings);
}
Aggregations