Search in sources :

Example 81 with MockGrpcService

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

the class ErrorGroupServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockErrorGroupService = new MockErrorGroupService();
    mockErrorStatsService = new MockErrorStatsService();
    mockReportErrorsService = new MockReportErrorsService();
    serviceHelper = new MockServiceHelper("in-process-1", Arrays.<MockGrpcService>asList(mockErrorGroupService, mockErrorStatsService, mockReportErrorsService));
    serviceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 82 with MockGrpcService

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

the class GroupServiceClientTest method startStaticServer.

@BeforeClass
public static void startStaticServer() {
    mockGroupService = new MockGroupService();
    mockMetricService = new MockMetricService();
    serviceHelper = new MockServiceHelper("in-process-1", Arrays.<MockGrpcService>asList(mockGroupService, mockMetricService));
    serviceHelper.start();
}
Also used : MockGrpcService(com.google.api.gax.grpc.testing.MockGrpcService) MockServiceHelper(com.google.api.gax.grpc.testing.MockServiceHelper) BeforeClass(org.junit.BeforeClass)

Example 83 with MockGrpcService

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

the class WebRiskServiceClientTest method startStaticServer.

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

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

the class WebRiskServiceV1Beta1ClientTest method startStaticServer.

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

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

the class SecurityCenterClientTest method startStaticServer.

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