use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class InstancesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonInstancesStub.getMethodDescriptors(), InstancesSettings.getDefaultEndpoint());
InstancesSettings settings = InstancesSettings.newBuilder().setTransportChannelProvider(InstancesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = InstancesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class NodeTypesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonNodeTypesStub.getMethodDescriptors(), NodeTypesSettings.getDefaultEndpoint());
NodeTypesSettings settings = NodeTypesSettings.newBuilder().setTransportChannelProvider(NodeTypesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = NodeTypesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class ProjectsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonProjectsStub.getMethodDescriptors(), ProjectsSettings.getDefaultEndpoint());
ProjectsSettings settings = ProjectsSettings.newBuilder().setTransportChannelProvider(ProjectsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = ProjectsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class PublicAdvertisedPrefixesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonPublicAdvertisedPrefixesStub.getMethodDescriptors(), PublicAdvertisedPrefixesSettings.getDefaultEndpoint());
PublicAdvertisedPrefixesSettings settings = PublicAdvertisedPrefixesSettings.newBuilder().setTransportChannelProvider(PublicAdvertisedPrefixesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = PublicAdvertisedPrefixesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionAutoscalersClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionAutoscalersStub.getMethodDescriptors(), RegionAutoscalersSettings.getDefaultEndpoint());
RegionAutoscalersSettings settings = RegionAutoscalersSettings.newBuilder().setTransportChannelProvider(RegionAutoscalersSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionAutoscalersClient.create(settings);
}
Aggregations