mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStore

type MockStore struct {
	mock.Mock
}

MockStore is an autogenerated mock type for the Store type

func NewMockStore

func NewMockStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStore

NewMockStore creates a new instance of MockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockStore) CreateUser

func (_m *MockStore) CreateUser(ctx context.Context, user *types.User) error

CreateUser provides a mock function with given fields: ctx, user

func (*MockStore) EXPECT

func (_m *MockStore) EXPECT() *MockStore_Expecter

func (*MockStore) GetUser

func (_m *MockStore) GetUser(ctx context.Context, id string) (*types.User, error)

GetUser provides a mock function with given fields: ctx, id

type MockStore_CreateUser_Call

type MockStore_CreateUser_Call struct {
	*mock.Call
}

MockStore_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'

func (*MockStore_CreateUser_Call) Return

func (*MockStore_CreateUser_Call) Run

func (*MockStore_CreateUser_Call) RunAndReturn

type MockStore_Expecter

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

func (*MockStore_Expecter) CreateUser

func (_e *MockStore_Expecter) CreateUser(ctx interface{}, user interface{}) *MockStore_CreateUser_Call

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • user *types.User

func (*MockStore_Expecter) GetUser

func (_e *MockStore_Expecter) GetUser(ctx interface{}, id interface{}) *MockStore_GetUser_Call

GetUser is a helper method to define mock.On call

  • ctx context.Context
  • id string

type MockStore_GetUser_Call

type MockStore_GetUser_Call struct {
	*mock.Call
}

MockStore_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser'

func (*MockStore_GetUser_Call) Return

func (*MockStore_GetUser_Call) Run

func (*MockStore_GetUser_Call) RunAndReturn

Jump to

Keyboard shortcuts

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