use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalForwardingRulesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalForwardingRulesStub.getMethodDescriptors(), GlobalForwardingRulesSettings.getDefaultEndpoint());
GlobalForwardingRulesSettings settings = GlobalForwardingRulesSettings.newBuilder().setTransportChannelProvider(GlobalForwardingRulesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalForwardingRulesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalNetworkEndpointGroupsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalNetworkEndpointGroupsStub.getMethodDescriptors(), GlobalNetworkEndpointGroupsSettings.getDefaultEndpoint());
GlobalNetworkEndpointGroupsSettings settings = GlobalNetworkEndpointGroupsSettings.newBuilder().setTransportChannelProvider(GlobalNetworkEndpointGroupsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalNetworkEndpointGroupsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalOperationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalOperationsStub.getMethodDescriptors(), GlobalOperationsSettings.getDefaultEndpoint());
GlobalOperationsSettings settings = GlobalOperationsSettings.newBuilder().setTransportChannelProvider(GlobalOperationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalOperationsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class HealthChecksClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonHealthChecksStub.getMethodDescriptors(), HealthChecksSettings.getDefaultEndpoint());
HealthChecksSettings settings = HealthChecksSettings.newBuilder().setTransportChannelProvider(HealthChecksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = HealthChecksClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ImagesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonImagesStub.getMethodDescriptors(), ImagesSettings.getDefaultEndpoint());
ImagesSettings settings = ImagesSettings.newBuilder().setTransportChannelProvider(ImagesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ImagesClient.create(settings);
}
Aggregations