Search in sources :

Example 76 with MockServiceHelper

use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-recommendations-ai by googleapis.

the class PredictionApiKeyRegistryClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockPredictionApiKeyRegistry = new MockPredictionApiKeyRegistry();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockPredictionApiKeyRegistry));
    mockServiceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 77 with MockServiceHelper

use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-recommendations-ai by googleapis.

the class PredictionServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockPredictionService = new MockPredictionService();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockPredictionService));
    mockServiceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 78 with MockServiceHelper

use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-recommendations-ai by googleapis.

the class UserEventServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockUserEventService = new MockUserEventService();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockUserEventService));
    mockServiceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 79 with MockServiceHelper

use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-bigquery-data-exchange by googleapis.

the class AnalyticsHubServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockAnalyticsHubService = new MockAnalyticsHubService();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockAnalyticsHubService));
    mockServiceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 80 with MockServiceHelper

use of com.google.api.gax.grpc.testing.MockServiceHelper in project google-cloud-java by GoogleCloudPlatform.

the class SubscriptionAdminClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockPublisher = new MockPublisher();
    mockIAMPolicy = new MockIAMPolicy();
    mockSubscriber = new MockSubscriber();
    serviceHelper = new MockServiceHelper("in-process-1", Arrays.<MockGrpcService>asList(mockPublisher, mockIAMPolicy, mockSubscriber));
    serviceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Aggregations

MockServiceHelper (com.google.api.gax.grpc.testing.MockServiceHelper)335 MockGrpcService (com.google.api.gax.grpc.testing.MockGrpcService)332 BeforeClass (org.junit.BeforeClass)329 Before (org.junit.Before)5 MockIAMPolicy (com.google.iam.v1.MockIAMPolicy)4 MockLocations (com.google.cloud.location.MockLocations)3 Timestamp (com.google.protobuf.Timestamp)2 Instant (org.threeten.bp.Instant)2 GaxGrpcProperties (com.google.api.gax.grpc.GaxGrpcProperties)1 LocalChannelProvider (com.google.api.gax.grpc.testing.LocalChannelProvider)1 MockStreamObserver (com.google.api.gax.grpc.testing.MockStreamObserver)1 StatusCode (com.google.api.gax.rpc.StatusCode)1 AnnotationNode (com.google.api.generator.engine.ast.AnnotationNode)1 AssignmentExpr (com.google.api.generator.engine.ast.AssignmentExpr)1 CastExpr (com.google.api.generator.engine.ast.CastExpr)1 ConcreteReference (com.google.api.generator.engine.ast.ConcreteReference)1 EnumRefExpr (com.google.api.generator.engine.ast.EnumRefExpr)1 Expr (com.google.api.generator.engine.ast.Expr)1 ExprStatement (com.google.api.generator.engine.ast.ExprStatement)1 InstanceofExpr (com.google.api.generator.engine.ast.InstanceofExpr)1