use of com.google.api.gax.httpjson.testing.MockHttpService in project gapic-generator-java by googleapis.
the class AddressesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonAddressesStub.getMethodDescriptors(), AddressesSettings.getDefaultEndpoint());
AddressesSettings settings = AddressesSettings.newBuilder().setTransportChannelProvider(AddressesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = AddressesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class SslPoliciesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonSslPoliciesStub.getMethodDescriptors(), SslPoliciesSettings.getDefaultEndpoint());
SslPoliciesSettings settings = SslPoliciesSettings.newBuilder().setTransportChannelProvider(SslPoliciesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = SslPoliciesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class SubnetworksClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonSubnetworksStub.getMethodDescriptors(), SubnetworksSettings.getDefaultEndpoint());
SubnetworksSettings settings = SubnetworksSettings.newBuilder().setTransportChannelProvider(SubnetworksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = SubnetworksClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetGrpcProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetGrpcProxiesStub.getMethodDescriptors(), TargetGrpcProxiesSettings.getDefaultEndpoint());
TargetGrpcProxiesSettings settings = TargetGrpcProxiesSettings.newBuilder().setTransportChannelProvider(TargetGrpcProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetGrpcProxiesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetInstancesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetInstancesStub.getMethodDescriptors(), TargetInstancesSettings.getDefaultEndpoint());
TargetInstancesSettings settings = TargetInstancesSettings.newBuilder().setTransportChannelProvider(TargetInstancesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetInstancesClient.create(settings);
}
Aggregations