clientmock

package
v2.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 3 Imported by: 0

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

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

func (c Call) MaxTimes(max int)

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

func (Call) MinTimes

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/v2/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/v2/examples/example-gateway/clients/quux/fixture

type EchoStringScenarios

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

EchoStringScenarios defines all fixture scenarios for EchoString

type MockIClient

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

MockIClient is a mock of IClient interface.

func NewMockIClient

func NewMockIClient(ctrl *gomock.Controller) *MockIClient

NewMockIClient creates a new mock instance.

func (*MockIClient) DropMessages

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

DropMessages mocks base method.

func (*MockIClient) EXPECT

func (m *MockIClient) EXPECT() *MockIClientMockRecorder

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

func (*MockIClient) EchoMessage

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

EchoMessage mocks base method.

func (*MockIClient) EchoString

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

EchoString mocks base method.

type MockIClientMockRecorder

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

MockIClientMockRecorder is the mock recorder for MockIClient.

func (*MockIClientMockRecorder) DropMessages

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

DropMessages indicates an expected call of DropMessages.

func (*MockIClientMockRecorder) EchoMessage

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

EchoMessage indicates an expected call of EchoMessage.

func (*MockIClientMockRecorder) EchoString

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

EchoString indicates an expected call of EchoString.

type MockIClientWithFixture

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

func (m *MockIClientWithFixture) EXPECT()

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

func (*MockIClientWithFixture) ExpectEchoMessage

func (m *MockIClientWithFixture) ExpectEchoMessage() *EchoMessageMock

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

func (*MockIClientWithFixture) ExpectEchoString

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