Search in sources :

Example 31 with MockGrpcService

use of com.google.api.gax.grpc.testing.MockGrpcService in project java-texttospeech by googleapis.

the class TextToSpeechClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockTextToSpeech = new MockTextToSpeech();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockTextToSpeech));
    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 32 with MockGrpcService

use of com.google.api.gax.grpc.testing.MockGrpcService in project java-monitoring by googleapis.

the class UptimeCheckServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockUptimeCheckService = new MockUptimeCheckService();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockUptimeCheckService));
    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 33 with MockGrpcService

use of com.google.api.gax.grpc.testing.MockGrpcService in project java-dataproc by googleapis.

the class BatchControllerClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockBatchController = new MockBatchController();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockBatchController));
    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 34 with MockGrpcService

use of com.google.api.gax.grpc.testing.MockGrpcService in project java-dataproc by googleapis.

the class ClusterControllerClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockClusterController = new MockClusterController();
    mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockClusterController));
    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 35 with MockGrpcService

use of com.google.api.gax.grpc.testing.MockGrpcService in project java-dataproc by googleapis.

the class JobControllerClientTest method startStaticServer.

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

Aggregations

MockGrpcService (com.google.api.gax.grpc.testing.MockGrpcService)332 MockServiceHelper (com.google.api.gax.grpc.testing.MockServiceHelper)332 BeforeClass (org.junit.BeforeClass)327 MockIAMPolicy (com.google.iam.v1.MockIAMPolicy)4 Before (org.junit.Before)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