use of com.google.api.gax.grpc.testing.FakeServiceImpl in project gax-java by googleapis.
the class GrpcDirectServerStreamingCallableTest method setUp.
@Before
public void setUp() throws InstantiationException, IllegalAccessException, IOException {
String serverName = "fakeservice";
FakeServiceImpl serviceImpl = new FakeServiceImpl();
inprocessServer = new InProcessServer<>(serviceImpl, serverName);
inprocessServer.start();
channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build();
clientContext = ClientContext.newBuilder().setTransportChannel(GrpcTransportChannel.create(channel)).setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)).build();
streamingCallSettings = ServerStreamingCallSettings.<Color, Money>newBuilder().build();
streamingCallable = GrpcCallableFactory.createServerStreamingCallable(GrpcCallSettings.create(METHOD_SERVER_STREAMING_RECOGNIZE), streamingCallSettings, clientContext);
}
use of com.google.api.gax.grpc.testing.FakeServiceImpl in project gax-java by googleapis.
the class GrpcDirectStreamingCallableTest method setUp.
@Before
public void setUp() throws InstantiationException, IllegalAccessException, IOException {
String serverName = "fakeservice";
serviceImpl = new FakeServiceImpl();
inprocessServer = new InProcessServer<>(serviceImpl, serverName);
inprocessServer.start();
channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build();
clientContext = ClientContext.newBuilder().setTransportChannel(GrpcTransportChannel.create(channel)).setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)).build();
}
use of com.google.api.gax.grpc.testing.FakeServiceImpl in project gax-java by googleapis.
the class GrpcCallableFactoryTest method setUp.
@Before
public void setUp() throws Exception {
String serverName = "fakeservice";
FakeServiceImpl serviceImpl = new FakeServiceImpl();
inprocessServer = new InProcessServer<>(serviceImpl, serverName);
inprocessServer.start();
channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build();
clientContext = ClientContext.newBuilder().setTransportChannel(GrpcTransportChannel.create(channel)).setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)).build();
}
Aggregations