use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionInstancesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionInstancesStub.getMethodDescriptors(), RegionInstancesSettings.getDefaultEndpoint());
RegionInstancesSettings settings = RegionInstancesSettings.newBuilder().setTransportChannelProvider(RegionInstancesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionInstancesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionNetworkEndpointGroupsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionNetworkEndpointGroupsStub.getMethodDescriptors(), RegionNetworkEndpointGroupsSettings.getDefaultEndpoint());
RegionNetworkEndpointGroupsSettings settings = RegionNetworkEndpointGroupsSettings.newBuilder().setTransportChannelProvider(RegionNetworkEndpointGroupsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionNetworkEndpointGroupsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionNotificationEndpointsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionNotificationEndpointsStub.getMethodDescriptors(), RegionNotificationEndpointsSettings.getDefaultEndpoint());
RegionNotificationEndpointsSettings settings = RegionNotificationEndpointsSettings.newBuilder().setTransportChannelProvider(RegionNotificationEndpointsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionNotificationEndpointsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionTargetHttpsProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionTargetHttpsProxiesStub.getMethodDescriptors(), RegionTargetHttpsProxiesSettings.getDefaultEndpoint());
RegionTargetHttpsProxiesSettings settings = RegionTargetHttpsProxiesSettings.newBuilder().setTransportChannelProvider(RegionTargetHttpsProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionTargetHttpsProxiesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionsStub.getMethodDescriptors(), RegionsSettings.getDefaultEndpoint());
RegionsSettings settings = RegionsSettings.newBuilder().setTransportChannelProvider(RegionsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionsClient.create(settings);
}
Aggregations