mocks

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserService

type UserService struct {
	mock.Mock
}

UserService is an autogenerated mock type for the UserService type

func NewUserService

func NewUserService(t mockConstructorTestingTNewUserService) *UserService

NewUserService creates a new instance of UserService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserService) CreateUser

func (_m *UserService) CreateUser(ctx context.Context, toBeCreated entities.User) (*entities.User, error)

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

func (*UserService) DeleteUserByID

func (_m *UserService) DeleteUserByID(ctx context.Context, id uint) error

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

func (*UserService) EXPECT

func (_m *UserService) EXPECT() *UserService_Expecter

func (*UserService) FindAllUsers

func (_m *UserService) FindAllUsers(ctx context.Context, pagination *models.Pagination) (*models.Page[*entities.User], error)

FindAllUsers provides a mock function with given fields: ctx, pagination

func (*UserService) FindAllUsersByCriteria

func (_m *UserService) FindAllUsersByCriteria(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.FindAllCriteria]) (*models.Page[*entities.User], error)

FindAllUsersByCriteria provides a mock function with given fields: ctx, criteriaAndPagination

func (*UserService) FindOneUserByID

func (_m *UserService) FindOneUserByID(ctx context.Context, id uint) (*entities.User, error)

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

func (*UserService) FindOneUserByIDForUpdate

func (_m *UserService) FindOneUserByIDForUpdate(ctx context.Context, id uint) (*entities.User, error)

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

func (*UserService) Overview

Overview provides a mock function with given fields: ctx, criteriaAndPagination

func (*UserService) UpdateUser

func (_m *UserService) UpdateUser(ctx context.Context, updated *entities.User) (*entities.User, error)

UpdateUser provides a mock function with given fields: ctx, updated

func (*UserService) WithTx

func (_m *UserService) WithTx(tx *gorm.DB) users.UserService

WithTx provides a mock function with given fields: tx

type UserService_CreateUser_Call

type UserService_CreateUser_Call struct {
	*mock.Call
}

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

func (*UserService_CreateUser_Call) Return

func (*UserService_CreateUser_Call) Run

type UserService_DeleteUserByID_Call

type UserService_DeleteUserByID_Call struct {
	*mock.Call
}

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

func (*UserService_DeleteUserByID_Call) Return

func (*UserService_DeleteUserByID_Call) Run

type UserService_Expecter

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

func (*UserService_Expecter) CreateUser

func (_e *UserService_Expecter) CreateUser(ctx interface{}, toBeCreated interface{}) *UserService_CreateUser_Call

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • toBeCreated entities.User

func (*UserService_Expecter) DeleteUserByID

func (_e *UserService_Expecter) DeleteUserByID(ctx interface{}, id interface{}) *UserService_DeleteUserByID_Call

DeleteUserByID is a helper method to define mock.On call

  • ctx context.Context
  • id uint

func (*UserService_Expecter) FindAllUsers

func (_e *UserService_Expecter) FindAllUsers(ctx interface{}, pagination interface{}) *UserService_FindAllUsers_Call

FindAllUsers is a helper method to define mock.On call

  • ctx context.Context
  • pagination *models.Pagination

func (*UserService_Expecter) FindAllUsersByCriteria

func (_e *UserService_Expecter) FindAllUsersByCriteria(ctx interface{}, criteriaAndPagination interface{}) *UserService_FindAllUsersByCriteria_Call

FindAllUsersByCriteria is a helper method to define mock.On call

  • ctx context.Context
  • criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.FindAllCriteria]

func (*UserService_Expecter) FindOneUserByID

func (_e *UserService_Expecter) FindOneUserByID(ctx interface{}, id interface{}) *UserService_FindOneUserByID_Call

FindOneUserByID is a helper method to define mock.On call

  • ctx context.Context
  • id uint

func (*UserService_Expecter) FindOneUserByIDForUpdate

func (_e *UserService_Expecter) FindOneUserByIDForUpdate(ctx interface{}, id interface{}) *UserService_FindOneUserByIDForUpdate_Call

FindOneUserByIDForUpdate is a helper method to define mock.On call

  • ctx context.Context
  • id uint

func (*UserService_Expecter) Overview

func (_e *UserService_Expecter) Overview(ctx interface{}, criteriaAndPagination interface{}) *UserService_Overview_Call

Overview is a helper method to define mock.On call

  • ctx context.Context
  • criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.OverviewCriteria]

func (*UserService_Expecter) UpdateUser

func (_e *UserService_Expecter) UpdateUser(ctx interface{}, updated interface{}) *UserService_UpdateUser_Call

UpdateUser is a helper method to define mock.On call

  • ctx context.Context
  • updated *entities.User

func (*UserService_Expecter) WithTx

func (_e *UserService_Expecter) WithTx(tx interface{}) *UserService_WithTx_Call

WithTx is a helper method to define mock.On call

  • tx *gorm.DB

type UserService_FindAllUsersByCriteria_Call

type UserService_FindAllUsersByCriteria_Call struct {
	*mock.Call
}

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

func (*UserService_FindAllUsersByCriteria_Call) Return

func (*UserService_FindAllUsersByCriteria_Call) Run

type UserService_FindAllUsers_Call

type UserService_FindAllUsers_Call struct {
	*mock.Call
}

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

func (*UserService_FindAllUsers_Call) Return

func (*UserService_FindAllUsers_Call) Run

type UserService_FindOneUserByIDForUpdate_Call

type UserService_FindOneUserByIDForUpdate_Call struct {
	*mock.Call
}

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

func (*UserService_FindOneUserByIDForUpdate_Call) Return

func (*UserService_FindOneUserByIDForUpdate_Call) Run

type UserService_FindOneUserByID_Call

type UserService_FindOneUserByID_Call struct {
	*mock.Call
}

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

func (*UserService_FindOneUserByID_Call) Return

func (*UserService_FindOneUserByID_Call) Run

type UserService_Overview_Call

type UserService_Overview_Call struct {
	*mock.Call
}

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

func (*UserService_Overview_Call) Return

func (*UserService_Overview_Call) Run

type UserService_UpdateUser_Call

type UserService_UpdateUser_Call struct {
	*mock.Call
}

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

func (*UserService_UpdateUser_Call) Return

func (*UserService_UpdateUser_Call) Run

type UserService_WithTx_Call

type UserService_WithTx_Call struct {
	*mock.Call
}

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

func (*UserService_WithTx_Call) Return

func (*UserService_WithTx_Call) Run

func (_c *UserService_WithTx_Call) Run(run func(tx *gorm.DB)) *UserService_WithTx_Call

Jump to

Keyboard shortcuts

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