use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class FirewallPoliciesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonFirewallPoliciesStub.getMethodDescriptors(), FirewallPoliciesSettings.getDefaultEndpoint());
FirewallPoliciesSettings settings = FirewallPoliciesSettings.newBuilder().setTransportChannelProvider(FirewallPoliciesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = FirewallPoliciesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class FirewallsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonFirewallsStub.getMethodDescriptors(), FirewallsSettings.getDefaultEndpoint());
FirewallsSettings settings = FirewallsSettings.newBuilder().setTransportChannelProvider(FirewallsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = FirewallsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionHealthChecksClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionHealthChecksStub.getMethodDescriptors(), RegionHealthChecksSettings.getDefaultEndpoint());
RegionHealthChecksSettings settings = RegionHealthChecksSettings.newBuilder().setTransportChannelProvider(RegionHealthChecksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionHealthChecksClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class RegionInstanceGroupsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonRegionInstanceGroupsStub.getMethodDescriptors(), RegionInstanceGroupsSettings.getDefaultEndpoint());
RegionInstanceGroupsSettings settings = RegionInstanceGroupsSettings.newBuilder().setTransportChannelProvider(RegionInstanceGroupsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = RegionInstanceGroupsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalAddressesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalAddressesStub.getMethodDescriptors(), GlobalAddressesSettings.getDefaultEndpoint());
GlobalAddressesSettings settings = GlobalAddressesSettings.newBuilder().setTransportChannelProvider(GlobalAddressesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalAddressesClient.create(settings);
}
Aggregations