clientmock

package
v2.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 5 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 {
	SaveContacts *SaveContactsScenarios
}

ClientFixture defines the client fixture type

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.

func (*MockClient) HTTPClient

func (m *MockClient) HTTPClient() *zanzibar.HTTPClient

HTTPClient mocks base method.

func (*MockClient) SaveContacts

SaveContacts mocks base method.

func (*MockClient) TestURLURL

func (m *MockClient) TestURLURL(arg0 context.Context, arg1 map[string]string) (context.Context, string, map[string]string, error)

TestURLURL mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) HTTPClient

func (mr *MockClientMockRecorder) HTTPClient() *gomock.Call

HTTPClient indicates an expected call of HTTPClient.

func (*MockClientMockRecorder) SaveContacts

func (mr *MockClientMockRecorder) SaveContacts(arg0, arg1, arg2 interface{}) *gomock.Call

SaveContacts indicates an expected call of SaveContacts.

func (*MockClientMockRecorder) TestURLURL

func (mr *MockClientMockRecorder) TestURLURL(arg0, arg1 interface{}) *gomock.Call

TestURLURL indicates an expected call of TestURLURL.

type MockClientWithFixture

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

MockClientWithFixture is a mock of Client interface with preset fixture

func New

New creates a new mock instance

func (*MockClientWithFixture) EXPECT

func (m *MockClientWithFixture) EXPECT()

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

func (*MockClientWithFixture) ExpectSaveContacts

func (m *MockClientWithFixture) ExpectSaveContacts() *SaveContactsMock

ExpectSaveContacts returns an object that allows the caller to choose expected scenario for SaveContacts

type SaveContactsFixture

type SaveContactsFixture struct {
	Arg0 context.Context
	Arg1 map[string]string
	Arg2 *contacts.Contacts_SaveContacts_Args

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

	Ret0 context.Context
	Ret1 *contacts.SaveContactsResponse
	Ret2 map[string]string
	Ret3 error
}

SaveContactsFixture defines the fixture type for SaveContacts

type SaveContactsMock

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

SaveContactsMock mocks the SaveContacts method

func (*SaveContactsMock) Success

func (s *SaveContactsMock) Success() Call

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

type SaveContactsScenarios

type SaveContactsScenarios struct {
	Success *SaveContactsFixture `scenario:"success"`
}

SaveContactsScenarios defines all fixture scenarios for SaveContacts

Jump to

Keyboard shortcuts

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