bartest

package
v1.70.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 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 Bar.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

Build a new mock client for service Bar.

mockCtrl := gomock.NewController(t)
client := bartest.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 Bar mock client.

func (*MockClient) Name

func (m *MockClient) Name(
	ctx context.Context,
	opts ...yarpc.CallOption,
) (success string, err error)

Name responds to a Name 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().Name(gomock.Any(), ...).Return(...)
... := client.Name(...)

Jump to

Keyboard shortcuts

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