Documentation
¶
Overview ¶
Package testutil provides testing utilities.
Index ¶
- type MockClientConn
- func (m *MockClientConn) Invoke(_ context.Context, _ string, _ interface{}, _ interface{}, ...) error
- func (m *MockClientConn) NewStream(_ context.Context, _ *grpc.StreamDesc, method string, _ ...grpc.CallOption) (grpc.ClientStream, error)
- func (m *MockClientConn) SetClient(method string, client interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClientConn ¶
type MockClientConn struct {
grpc.ClientConnInterface
// contains filtered or unexported fields
}
MockClientConn is a mock implementation of grpc.ClientConnInterface for testing.
func NewMockClientConn ¶
func NewMockClientConn(t *testing.T) *MockClientConn
NewMockClientConn creates a new mock client connection.
func (*MockClientConn) Invoke ¶
func (m *MockClientConn) Invoke(_ context.Context, _ string, _ interface{}, _ interface{}, _ ...grpc.CallOption) error
Invoke is a mock implementation of the Invoke method.
func (*MockClientConn) NewStream ¶
func (m *MockClientConn) NewStream(_ context.Context, _ *grpc.StreamDesc, method string, _ ...grpc.CallOption) (grpc.ClientStream, error)
NewStream is a mock implementation of the NewStream method.
func (*MockClientConn) SetClient ¶
func (m *MockClientConn) SetClient(method string, client interface{})
SetClient sets a mock client for a given type.
Click to show internal directories.
Click to hide internal directories.