use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class MachineTypesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonMachineTypesStub.getMethodDescriptors(), MachineTypesSettings.getDefaultEndpoint());
MachineTypesSettings settings = MachineTypesSettings.newBuilder().setTransportChannelProvider(MachineTypesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = MachineTypesClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class NetworkEndpointGroupsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonNetworkEndpointGroupsStub.getMethodDescriptors(), NetworkEndpointGroupsSettings.getDefaultEndpoint());
NetworkEndpointGroupsSettings settings = NetworkEndpointGroupsSettings.newBuilder().setTransportChannelProvider(NetworkEndpointGroupsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = NetworkEndpointGroupsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class NetworksClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonNetworksStub.getMethodDescriptors(), NetworksSettings.getDefaultEndpoint());
NetworksSettings settings = NetworksSettings.newBuilder().setTransportChannelProvider(NetworksSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = NetworksClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalOrganizationOperationsClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalOrganizationOperationsStub.getMethodDescriptors(), GlobalOrganizationOperationsSettings.getDefaultEndpoint());
GlobalOrganizationOperationsSettings settings = GlobalOrganizationOperationsSettings.newBuilder().setTransportChannelProvider(GlobalOrganizationOperationsSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalOrganizationOperationsClient.create(settings);
}
use of com.google.api.gax.httpjson.testing.MockHttpService in project java-compute by googleapis.
the class GlobalPublicDelegatedPrefixesClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() throws IOException {
mockService = new MockHttpService(HttpJsonGlobalPublicDelegatedPrefixesStub.getMethodDescriptors(), GlobalPublicDelegatedPrefixesSettings.getDefaultEndpoint());
GlobalPublicDelegatedPrefixesSettings settings = GlobalPublicDelegatedPrefixesSettings.newBuilder().setTransportChannelProvider(GlobalPublicDelegatedPrefixesSettings.defaultHttpJsonTransportProviderBuilder().setHttpTransport(mockService).build()).setCredentialsProvider(NoCredentialsProvider.create()).build();
client = GlobalPublicDelegatedPrefixesClient.create(settings);
}
Aggregations