clientmock

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 3 Imported by: 24

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.3.1

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().

func (Call) MaxTimes added in v0.3.1

func (c Call) MaxTimes(max int)

MaxTimes marks a fixture as callable up to a maximum number of times.

func (Call) MinTimes added in v0.3.1

func (c Call) MinTimes(min int)

MinTimes marks a fixture as must be called a minimum number of times.

type ClientFixture

type ClientFixture struct {
	EchoMessage *EchoMessageScenarios
	EchoString  *EchoStringScenarios
}

ClientFixture defines the client fixture type

type EchoMessageFixture

type EchoMessageFixture struct {
	Arg0 *base.Message

	// Arg{n}Any indicates the nth argument could be gomock.Any
	Arg0Any bool

	Ret0 *base.Message
}

EchoMessageFixture defines the fixture type for EchoMessage

type EchoMessageMock

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

EchoMessageMock mocks the EchoMessage method

func (*EchoMessageMock) Success

func (s *EchoMessageMock) Success() Call

Success sets the expected scenario as defined in the concrete fixture package github.com/uber/zanzibar/examples/example-gateway/clients/quux/fixture

type EchoMessageScenarios

type EchoMessageScenarios struct {
	Success *EchoMessageFixture `scenario:"success"`
}

EchoMessageScenarios defines all fixture scenarios for EchoMessage

type EchoStringFixture

type EchoStringFixture struct {
	Arg0 string

	// Arg{n}Any indicates the nth argument could be gomock.Any
	Arg0Any bool

	Ret0 string
}

EchoStringFixture defines the fixture type for EchoString

type EchoStringMock

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

EchoStringMock mocks the EchoString method

func (*EchoStringMock) Success

func (s *EchoStringMock) Success() Call

Success sets the expected scenario as defined in the concrete fixture package github.com/uber/zanzibar/examples/example-gateway/clients/quux/fixture

type EchoStringScenarios

type EchoStringScenarios struct {
	Success *EchoStringFixture `scenario:"success"`
}

EchoStringScenarios defines all fixture scenarios for EchoString

type MockIClient added in v0.4.3

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

MockIClient is a mock of IClient interface.

func NewMockIClient added in v0.4.3

func NewMockIClient(ctrl *gomock.Controller) *MockIClient

NewMockIClient creates a new mock instance.

func (*MockIClient) DropMessages added in v0.4.3

func (m *MockIClient) DropMessages(arg0, arg1 *base.Message)

DropMessages mocks base method.

func (*MockIClient) EXPECT added in v0.4.3

func (m *MockIClient) EXPECT() *MockIClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIClient) EchoMessage added in v0.4.3

func (m *MockIClient) EchoMessage(arg0 *base.Message) *base.Message

EchoMessage mocks base method.

func (*MockIClient) EchoString added in v0.4.3

func (m *MockIClient) EchoString(arg0 string) string

EchoString mocks base method.

type MockIClientMockRecorder added in v0.4.3

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

MockIClientMockRecorder is the mock recorder for MockIClient.

func (*MockIClientMockRecorder) DropMessages added in v0.4.3

func (mr *MockIClientMockRecorder) DropMessages(arg0, arg1 interface{}) *gomock.Call

DropMessages indicates an expected call of DropMessages.

func (*MockIClientMockRecorder) EchoMessage added in v0.4.3

func (mr *MockIClientMockRecorder) EchoMessage(arg0 interface{}) *gomock.Call

EchoMessage indicates an expected call of EchoMessage.

func (*MockIClientMockRecorder) EchoString added in v0.4.3

func (mr *MockIClientMockRecorder) EchoString(arg0 interface{}) *gomock.Call

EchoString indicates an expected call of EchoString.

type MockIClientWithFixture added in v0.4.3

type MockIClientWithFixture struct {
	*MockIClient
	// contains filtered or unexported fields
}

MockIClientWithFixture is a mock of Client interface with preset fixture

func New

New creates a new mock instance

func (*MockIClientWithFixture) EXPECT added in v0.4.3

func (m *MockIClientWithFixture) EXPECT()

EXPECT shadows the EXPECT method on the underlying mock client. It should not be called directly.

func (*MockIClientWithFixture) ExpectEchoMessage added in v0.4.3

func (m *MockIClientWithFixture) ExpectEchoMessage() *EchoMessageMock

ExpectEchoMessage returns an object that allows the caller to choose expected scenario for EchoMessage

func (*MockIClientWithFixture) ExpectEchoString added in v0.4.3

func (m *MockIClientWithFixture) ExpectEchoString() *EchoStringMock

ExpectEchoString returns an object that allows the caller to choose expected scenario for EchoString

Jump to

Keyboard shortcuts

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