use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ImageFamilyViewsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonImageFamilyViewsStub.getMethodDescriptors(), ImageFamilyViewsSettings.getDefaultEndpoint());
ImageFamilyViewsSettings settings = ImageFamilyViewsSettings.newBuilder().setTransportChannelProvider(ImageFamilyViewsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ImageFamilyViewsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ResourcePoliciesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonResourcePoliciesStub.getMethodDescriptors(), ResourcePoliciesSettings.getDefaultEndpoint());
ResourcePoliciesSettings settings = ResourcePoliciesSettings.newBuilder().setTransportChannelProvider(ResourcePoliciesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ResourcePoliciesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class AcceleratorTypesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonAcceleratorTypesStub.getMethodDescriptors(), AcceleratorTypesSettings.getDefaultEndpoint());
AcceleratorTypesSettings settings = AcceleratorTypesSettings.newBuilder().setTransportChannelProvider(AcceleratorTypesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = AcceleratorTypesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class AutoscalersClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonAutoscalersStub.getMethodDescriptors(), AutoscalersSettings.getDefaultEndpoint());
AutoscalersSettings settings = AutoscalersSettings.newBuilder().setTransportChannelProvider(AutoscalersSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = AutoscalersClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class BackendBucketsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonBackendBucketsStub.getMethodDescriptors(), BackendBucketsSettings.getDefaultEndpoint());
BackendBucketsSettings settings = BackendBucketsSettings.newBuilder().setTransportChannelProvider(BackendBucketsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = BackendBucketsClient.create(settings);
}
Aggregations