Search in sources :

Example 51 with MockHttpService

use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.

the class RegionCommitmentsClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() throws IOException {
    mockService = new MockHttpService(HttpJsonRegionCommitmentsStub.getMethodDescriptors(), RegionCommitmentsSettings.getDefaultEndpoint());
    RegionCommitmentsSettings settings = RegionCommitmentsSettings.newBuilder().setTransportChannelProvider(RegionCommitmentsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
    client = RegionCommitmentsClient.create(settings);
}
Also used : MockHttpService(com.google.api.gax.httpjson.testing.MockHttpService) BeforeClass(org.junit.BeforeClass)

Example 52 with MockHttpService

use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.

the class RegionDiskTypesClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() throws IOException {
    mockService = new MockHttpService(HttpJsonRegionDiskTypesStub.getMethodDescriptors(), RegionDiskTypesSettings.getDefaultEndpoint());
    RegionDiskTypesSettings settings = RegionDiskTypesSettings.newBuilder().setTransportChannelProvider(RegionDiskTypesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
    client = RegionDiskTypesClient.create(settings);
}
Also used : MockHttpService(com.google.api.gax.httpjson.testing.MockHttpService) BeforeClass(org.junit.BeforeClass)

Example 53 with MockHttpService

use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.

the class RegionDisksClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() throws IOException {
    mockService = new MockHttpService(HttpJsonRegionDisksStub.getMethodDescriptors(), RegionDisksSettings.getDefaultEndpoint());
    RegionDisksSettings settings = RegionDisksSettings.newBuilder().setTransportChannelProvider(RegionDisksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
    client = RegionDisksClient.create(settings);
}
Also used : MockHttpService(com.google.api.gax.httpjson.testing.MockHttpService) BeforeClass(org.junit.BeforeClass)

Example 54 with MockHttpService

use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.

the class RegionHealthCheckServicesClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() throws IOException {
    mockService = new MockHttpService(HttpJsonRegionHealthCheckServicesStub.getMethodDescriptors(), RegionHealthCheckServicesSettings.getDefaultEndpoint());
    RegionHealthCheckServicesSettings settings = RegionHealthCheckServicesSettings.newBuilder().setTransportChannelProvider(RegionHealthCheckServicesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
    client = RegionHealthCheckServicesClient.create(settings);
}
Also used : MockHttpService(com.google.api.gax.httpjson.testing.MockHttpService) BeforeClass(org.junit.BeforeClass)

Example 55 with MockHttpService

use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.

the class RegionInstanceGroupManagersClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() throws IOException {
    mockService = new MockHttpService(HttpJsonRegionInstanceGroupManagersStub.getMethodDescriptors(), RegionInstanceGroupManagersSettings.getDefaultEndpoint());
    RegionInstanceGroupManagersSettings settings = RegionInstanceGroupManagersSettings.newBuilder().setTransportChannelProvider(RegionInstanceGroupManagersSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
    client = RegionInstanceGroupManagersClient.create(settings);
}
Also used : MockHttpService(com.google.api.gax.httpjson.testing.MockHttpService) BeforeClass(org.junit.BeforeClass)

Aggregations

MockHttpService (com.google.api.gax.httpjson.testing.MockHttpService)84 BeforeClass (org.junit.BeforeClass)84