• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package io.grafeas.v1;
18 
19 import com.google.api.core.BetaApi;
20 import com.google.api.gax.grpc.testing.MockGrpcService;
21 import com.google.protobuf.AbstractMessage;
22 import io.grpc.ServerServiceDefinition;
23 import java.util.List;
24 import javax.annotation.Generated;
25 
26 @BetaApi
27 @Generated("by gapic-generator-java")
28 public class MockGrafeas implements MockGrpcService {
29   private final MockGrafeasImpl serviceImpl;
30 
MockGrafeas()31   public MockGrafeas() {
32     serviceImpl = new MockGrafeasImpl();
33   }
34 
35   @Override
getRequests()36   public List<AbstractMessage> getRequests() {
37     return serviceImpl.getRequests();
38   }
39 
40   @Override
addResponse(AbstractMessage response)41   public void addResponse(AbstractMessage response) {
42     serviceImpl.addResponse(response);
43   }
44 
45   @Override
addException(Exception exception)46   public void addException(Exception exception) {
47     serviceImpl.addException(exception);
48   }
49 
50   @Override
getServiceDefinition()51   public ServerServiceDefinition getServiceDefinition() {
52     return serviceImpl.bindService();
53   }
54 
55   @Override
reset()56   public void reset() {
57     serviceImpl.reset();
58   }
59 }
60