use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RoutersClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRoutersStub.getMethodDescriptors(), RoutersSettings.getDefaultEndpoint());
RoutersSettings settings = RoutersSettings.newBuilder().setTransportChannelProvider(RoutersSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RoutersClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RoutesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRoutesStub.getMethodDescriptors(), RoutesSettings.getDefaultEndpoint());
RoutesSettings settings = RoutesSettings.newBuilder().setTransportChannelProvider(RoutesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RoutesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class SecurityPoliciesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonSecurityPoliciesStub.getMethodDescriptors(), SecurityPoliciesSettings.getDefaultEndpoint());
SecurityPoliciesSettings settings = SecurityPoliciesSettings.newBuilder().setTransportChannelProvider(SecurityPoliciesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = SecurityPoliciesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ServiceAttachmentsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonServiceAttachmentsStub.getMethodDescriptors(), ServiceAttachmentsSettings.getDefaultEndpoint());
ServiceAttachmentsSettings settings = ServiceAttachmentsSettings.newBuilder().setTransportChannelProvider(ServiceAttachmentsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ServiceAttachmentsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class SnapshotsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonSnapshotsStub.getMethodDescriptors(), SnapshotsSettings.getDefaultEndpoint());
SnapshotsSettings settings = SnapshotsSettings.newBuilder().setTransportChannelProvider(SnapshotsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = SnapshotsClient.create(settings);
}
Aggregations