use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class SslCertificatesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonSslCertificatesStub.getMethodDescriptors(), SslCertificatesSettings.getDefaultEndpoint());
SslCertificatesSettings settings = SslCertificatesSettings.newBuilder().setTransportChannelProvider(SslCertificatesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = SslCertificatesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetHttpProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetHttpProxiesStub.getMethodDescriptors(), TargetHttpProxiesSettings.getDefaultEndpoint());
TargetHttpProxiesSettings settings = TargetHttpProxiesSettings.newBuilder().setTransportChannelProvider(TargetHttpProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetHttpProxiesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetHttpsProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetHttpsProxiesStub.getMethodDescriptors(), TargetHttpsProxiesSettings.getDefaultEndpoint());
TargetHttpsProxiesSettings settings = TargetHttpsProxiesSettings.newBuilder().setTransportChannelProvider(TargetHttpsProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetHttpsProxiesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class VpnTunnelsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonVpnTunnelsStub.getMethodDescriptors(), VpnTunnelsSettings.getDefaultEndpoint());
VpnTunnelsSettings settings = VpnTunnelsSettings.newBuilder().setTransportChannelProvider(VpnTunnelsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = VpnTunnelsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ZoneOperationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonZoneOperationsStub.getMethodDescriptors(), ZoneOperationsSettings.getDefaultEndpoint());
ZoneOperationsSettings settings = ZoneOperationsSettings.newBuilder().setTransportChannelProvider(ZoneOperationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ZoneOperationsClient.create(settings);
}
Aggregations