Search in sources :

Example 1 with NoopStub

use of io.grpc.stub.AbstractStubTest.NoopStub in project grpc-java by grpc.

the class AbstractStubTest method defaultCallOptions.

@Test
public void defaultCallOptions() {
    NoopStub stub = NoopStub.newStub(new StubFactory<NoopStub>() {

        @Override
        public NoopStub newStub(Channel channel, CallOptions callOptions) {
            return create(channel, callOptions);
        }
    }, channel, CallOptions.DEFAULT);
    assertThat(stub.getCallOptions().getOption(ClientCalls.STUB_TYPE_OPTION)).isNull();
}
Also used : Channel(io.grpc.Channel) NoopStub(io.grpc.stub.AbstractStubTest.NoopStub) CallOptions(io.grpc.CallOptions) Test(org.junit.Test)

Aggregations

CallOptions (io.grpc.CallOptions)1 Channel (io.grpc.Channel)1 NoopStub (io.grpc.stub.AbstractStubTest.NoopStub)1 Test (org.junit.Test)1