hellotest

package
v1.27.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

MockClient implements a gomock-compatible mock client for service Hello.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

Build a new mock client for service Hello.

mockCtrl := gomock.NewController(t)
client := hellotest.NewMockClient(mockCtrl)

Use EXPECT() to set expectations on the mock.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *_MockClientRecorder

EXPECT returns an object that allows you to define an expectation on the Hello mock client.

func (*MockClient) Echo

func (m *MockClient) Echo(
	ctx context.Context,
	_Echo *echo.EchoRequest,
	opts ...yarpc.CallOption,
) (success *echo.EchoResponse, err error)

Echo responds to a Echo call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().Echo(gomock.Any(), ...).Return(...)
... := client.Echo(...)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL