Documentation ¶
Overview ¶
Package clientmock is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶ added in v0.6.2
type Call struct {
// contains filtered or unexported fields
}
Call is a thin wrapper around gomock.Call for exposing the methods that do not mutate the fixture related information like Return().
type ClientFixture ¶ added in v0.6.2
type ClientFixture struct {
EchoEcho *EchoEchoScenarios
}
ClientFixture defines the client fixture type
type EchoEchoFixture ¶ added in v0.6.2
type EchoEchoFixture struct { Arg0 context.Context Arg1 *echo.Request Arg2 []yarpc.CallOption // Arg{n}Any indicates the nth argument could be gomock.Any Arg0Any bool Arg1Any bool // Arg2Any indicates the variadic argument is a number of gomock.Any Arg2Any int Ret0 context.Context Ret1 *echo.Response Ret2 error }
EchoEchoFixture defines the fixture type for EchoEcho
type EchoEchoMock ¶ added in v0.6.2
type EchoEchoMock struct {
// contains filtered or unexported fields
}
EchoEchoMock mocks the EchoEcho method
func (*EchoEchoMock) Success ¶ added in v0.6.2
func (s *EchoEchoMock) Success() Call
Success sets the expected scenario as defined in the concrete fixture package github.com/uber/zanzibar/examples/selective-gateway/clients/echo/fixture
type EchoEchoScenarios ¶ added in v0.6.2
type EchoEchoScenarios struct {
Success *EchoEchoFixture `scenario:"success"`
}
EchoEchoScenarios defines all fixture scenarios for EchoEcho
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) EchoEcho ¶ added in v0.6.1
func (mr *MockClientMockRecorder) EchoEcho(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
EchoEcho indicates an expected call of EchoEcho.
type MockClientWithFixture ¶ added in v0.6.2
type MockClientWithFixture struct { *MockClient // contains filtered or unexported fields }
MockClientWithFixture is a mock of Client interface with preset fixture
func New ¶ added in v0.6.2
func New(ctrl *gomock.Controller, fixture *ClientFixture) *MockClientWithFixture
New creates a new mock instance
func (*MockClientWithFixture) EXPECT ¶ added in v0.6.2
func (m *MockClientWithFixture) EXPECT()
EXPECT shadows the EXPECT method on the underlying mock client. It should not be called directly.
func (*MockClientWithFixture) ExpectEchoEcho ¶ added in v0.6.2
func (m *MockClientWithFixture) ExpectEchoEcho() *EchoEchoMock
ExpectEchoEcho returns an object that allows the caller to choose expected scenario for EchoEcho