use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetTcpProxiesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetTcpProxiesStub.getMethodDescriptors(), TargetTcpProxiesSettings.getDefaultEndpoint());
TargetTcpProxiesSettings settings = TargetTcpProxiesSettings.newBuilder().setTransportChannelProvider(TargetTcpProxiesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetTcpProxiesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class TargetVpnGatewaysClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonTargetVpnGatewaysStub.getMethodDescriptors(), TargetVpnGatewaysSettings.getDefaultEndpoint());
TargetVpnGatewaysSettings settings = TargetVpnGatewaysSettings.newBuilder().setTransportChannelProvider(TargetVpnGatewaysSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = TargetVpnGatewaysClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class VpnGatewaysClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonVpnGatewaysStub.getMethodDescriptors(), VpnGatewaysSettings.getDefaultEndpoint());
VpnGatewaysSettings settings = VpnGatewaysSettings.newBuilder().setTransportChannelProvider(VpnGatewaysSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = VpnGatewaysClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project gax-java by googleapis.
the class OperationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonOperationsStub.getMethodDescriptors(), OperationsSettings.getDefaultEndpoint());
OperationsSettings settings = OperationsSettings.newBuilder().setTransportChannelProvider(OperationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = OperationsClient.create(settings);
}
Aggregations