use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class AddressesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonAddressesStub.getMethodDescriptors(), AddressesSettings.getDefaultEndpoint());
AddressesSettings settings = AddressesSettings.newBuilder().setTransportChannelProvider(AddressesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = AddressesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project gapic-generator-java 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 InstanceGroupManagersClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonInstanceGroupManagersStub.getMethodDescriptors(), InstanceGroupManagersSettings.getDefaultEndpoint());
InstanceGroupManagersSettings settings = InstanceGroupManagersSettings.newBuilder().setTransportChannelProvider(InstanceGroupManagersSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = InstanceGroupManagersClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class InstanceGroupsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonInstanceGroupsStub.getMethodDescriptors(), InstanceGroupsSettings.getDefaultEndpoint());
InstanceGroupsSettings settings = InstanceGroupsSettings.newBuilder().setTransportChannelProvider(InstanceGroupsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = InstanceGroupsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class InstanceTemplatesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonInstanceTemplatesStub.getMethodDescriptors(), InstanceTemplatesSettings.getDefaultEndpoint());
InstanceTemplatesSettings settings = InstanceTemplatesSettings.newBuilder().setTransportChannelProvider(InstanceTemplatesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = InstanceTemplatesClient.create(settings);
}
Aggregations