Documentation ¶
Overview ¶
Package testservice provides an interface for testing with the Test service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestService ¶
type TestService struct { tgrpcpb.TestClient // contains filtered or unexported fields }
TestService represents a running test service client and server.
func Start ¶
func Start(ctx context.Context, t *testing.T, testSrv tgrpcpb.TestServer, opts ...grpc.DialOption) *TestService
Start starts the gRCP server with the specified TestServer implementation, dials the server, and returns a handle to the test service.
func (*TestService) MustSendStream ¶
func (ts *TestService) MustSendStream(ctx context.Context, t *testing.T) *TestStreamClient
MustSendStream calls SendStream and fails the test fatally on error.
func (*TestService) MustSendUnary ¶
MustSendUnary calls SendUnary and fails the test fatally on error.
type TestStreamClient ¶
type TestStreamClient struct {
tgrpcpb.Test_SendStreamClient
}
TestStreamClient is a SendStreamClient with additional Must methods.
Click to show internal directories.
Click to hide internal directories.