use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class DiskTypesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonDiskTypesStub.getMethodDescriptors(), DiskTypesSettings.getDefaultEndpoint());
DiskTypesSettings settings = DiskTypesSettings.newBuilder().setTransportChannelProvider(DiskTypesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = DiskTypesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ForwardingRulesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonForwardingRulesStub.getMethodDescriptors(), ForwardingRulesSettings.getDefaultEndpoint());
ForwardingRulesSettings settings = ForwardingRulesSettings.newBuilder().setTransportChannelProvider(ForwardingRulesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ForwardingRulesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionOperationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionOperationsStub.getMethodDescriptors(), RegionOperationsSettings.getDefaultEndpoint());
RegionOperationsSettings settings = RegionOperationsSettings.newBuilder().setTransportChannelProvider(RegionOperationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionOperationsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionSslCertificatesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionSslCertificatesStub.getMethodDescriptors(), RegionSslCertificatesSettings.getDefaultEndpoint());
RegionSslCertificatesSettings settings = RegionSslCertificatesSettings.newBuilder().setTransportChannelProvider(RegionSslCertificatesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionSslCertificatesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionTargetHttpProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionTargetHttpProxiesStub.getMethodDescriptors(), RegionTargetHttpProxiesSettings.getDefaultEndpoint());
RegionTargetHttpProxiesSettings settings = RegionTargetHttpProxiesSettings.newBuilder().setTransportChannelProvider(RegionTargetHttpProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionTargetHttpProxiesClient.create(settings);
}
Aggregations