mocks

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserServiceMock

type UserServiceMock struct {
	CheckUsersExistenceMock mUserServiceMockCheckUsersExistence

	CreateMock mUserServiceMockCreate

	DeleteMock mUserServiceMockDelete

	GetMock mUserServiceMockGet

	UpdateMock mUserServiceMockUpdate
	// contains filtered or unexported fields
}

UserServiceMock implements service.UserService

func NewUserServiceMock

func NewUserServiceMock(t minimock.Tester) *UserServiceMock

NewUserServiceMock returns a mock for service.UserService

func (*UserServiceMock) CheckUsersExistence

func (mmCheckUsersExistence *UserServiceMock) CheckUsersExistence(ctx context.Context, usernames []string) (err error)

CheckUsersExistence implements service.UserService

func (*UserServiceMock) CheckUsersExistenceAfterCounter

func (mmCheckUsersExistence *UserServiceMock) CheckUsersExistenceAfterCounter() uint64

CheckUsersExistenceAfterCounter returns a count of finished UserServiceMock.CheckUsersExistence invocations

func (*UserServiceMock) CheckUsersExistenceBeforeCounter

func (mmCheckUsersExistence *UserServiceMock) CheckUsersExistenceBeforeCounter() uint64

CheckUsersExistenceBeforeCounter returns a count of UserServiceMock.CheckUsersExistence invocations

func (*UserServiceMock) Create

func (mmCreate *UserServiceMock) Create(ctx context.Context, info *model.UserCreateInfo) (i1 int64, err error)

Create implements service.UserService

func (*UserServiceMock) CreateAfterCounter

func (mmCreate *UserServiceMock) CreateAfterCounter() uint64

CreateAfterCounter returns a count of finished UserServiceMock.Create invocations

func (*UserServiceMock) CreateBeforeCounter

func (mmCreate *UserServiceMock) CreateBeforeCounter() uint64

CreateBeforeCounter returns a count of UserServiceMock.Create invocations

func (*UserServiceMock) Delete

func (mmDelete *UserServiceMock) Delete(ctx context.Context, id int64) (err error)

Delete implements service.UserService

func (*UserServiceMock) DeleteAfterCounter

func (mmDelete *UserServiceMock) DeleteAfterCounter() uint64

DeleteAfterCounter returns a count of finished UserServiceMock.Delete invocations

func (*UserServiceMock) DeleteBeforeCounter

func (mmDelete *UserServiceMock) DeleteBeforeCounter() uint64

DeleteBeforeCounter returns a count of UserServiceMock.Delete invocations

func (*UserServiceMock) Get

func (mmGet *UserServiceMock) Get(ctx context.Context, id int64) (up1 *model.User, err error)

Get implements service.UserService

func (*UserServiceMock) GetAfterCounter

func (mmGet *UserServiceMock) GetAfterCounter() uint64

GetAfterCounter returns a count of finished UserServiceMock.Get invocations

func (*UserServiceMock) GetBeforeCounter

func (mmGet *UserServiceMock) GetBeforeCounter() uint64

GetBeforeCounter returns a count of UserServiceMock.Get invocations

func (*UserServiceMock) MinimockCheckUsersExistenceDone

func (m *UserServiceMock) MinimockCheckUsersExistenceDone() bool

MinimockCheckUsersExistenceDone returns true if the count of the CheckUsersExistence invocations corresponds the number of defined expectations

func (*UserServiceMock) MinimockCheckUsersExistenceInspect

func (m *UserServiceMock) MinimockCheckUsersExistenceInspect()

MinimockCheckUsersExistenceInspect logs each unmet expectation

func (*UserServiceMock) MinimockCreateDone

func (m *UserServiceMock) MinimockCreateDone() bool

MinimockCreateDone returns true if the count of the Create invocations corresponds the number of defined expectations

func (*UserServiceMock) MinimockCreateInspect

func (m *UserServiceMock) MinimockCreateInspect()

MinimockCreateInspect logs each unmet expectation

func (*UserServiceMock) MinimockDeleteDone

func (m *UserServiceMock) MinimockDeleteDone() bool

MinimockDeleteDone returns true if the count of the Delete invocations corresponds the number of defined expectations

func (*UserServiceMock) MinimockDeleteInspect

func (m *UserServiceMock) MinimockDeleteInspect()

MinimockDeleteInspect logs each unmet expectation

func (*UserServiceMock) MinimockFinish

func (m *UserServiceMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*UserServiceMock) MinimockGetDone

func (m *UserServiceMock) MinimockGetDone() bool

MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations

func (*UserServiceMock) MinimockGetInspect

func (m *UserServiceMock) MinimockGetInspect()

MinimockGetInspect logs each unmet expectation

func (*UserServiceMock) MinimockUpdateDone

func (m *UserServiceMock) MinimockUpdateDone() bool

MinimockUpdateDone returns true if the count of the Update invocations corresponds the number of defined expectations

func (*UserServiceMock) MinimockUpdateInspect

func (m *UserServiceMock) MinimockUpdateInspect()

MinimockUpdateInspect logs each unmet expectation

func (*UserServiceMock) MinimockWait

func (m *UserServiceMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*UserServiceMock) Update

func (mmUpdate *UserServiceMock) Update(ctx context.Context, info *model.UserUpdateInfo) (err error)

Update implements service.UserService

func (*UserServiceMock) UpdateAfterCounter

func (mmUpdate *UserServiceMock) UpdateAfterCounter() uint64

UpdateAfterCounter returns a count of finished UserServiceMock.Update invocations

func (*UserServiceMock) UpdateBeforeCounter

func (mmUpdate *UserServiceMock) UpdateBeforeCounter() uint64

UpdateBeforeCounter returns a count of UserServiceMock.Update invocations

type UserServiceMockCheckUsersExistenceExpectation

type UserServiceMockCheckUsersExistenceExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

UserServiceMockCheckUsersExistenceExpectation specifies expectation struct of the UserService.CheckUsersExistence

func (*UserServiceMockCheckUsersExistenceExpectation) Then

Then sets up UserService.CheckUsersExistence return parameters for the expectation previously defined by the When method

type UserServiceMockCheckUsersExistenceParams

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

UserServiceMockCheckUsersExistenceParams contains parameters of the UserService.CheckUsersExistence

type UserServiceMockCheckUsersExistenceResults

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

UserServiceMockCheckUsersExistenceResults contains results of the UserService.CheckUsersExistence

type UserServiceMockCreateExpectation

type UserServiceMockCreateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

UserServiceMockCreateExpectation specifies expectation struct of the UserService.Create

func (*UserServiceMockCreateExpectation) Then

Then sets up UserService.Create return parameters for the expectation previously defined by the When method

type UserServiceMockCreateParams

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

UserServiceMockCreateParams contains parameters of the UserService.Create

type UserServiceMockCreateResults

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

UserServiceMockCreateResults contains results of the UserService.Create

type UserServiceMockDeleteExpectation

type UserServiceMockDeleteExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

UserServiceMockDeleteExpectation specifies expectation struct of the UserService.Delete

func (*UserServiceMockDeleteExpectation) Then

Then sets up UserService.Delete return parameters for the expectation previously defined by the When method

type UserServiceMockDeleteParams

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

UserServiceMockDeleteParams contains parameters of the UserService.Delete

type UserServiceMockDeleteResults

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

UserServiceMockDeleteResults contains results of the UserService.Delete

type UserServiceMockGetExpectation

type UserServiceMockGetExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

UserServiceMockGetExpectation specifies expectation struct of the UserService.Get

func (*UserServiceMockGetExpectation) Then

Then sets up UserService.Get return parameters for the expectation previously defined by the When method

type UserServiceMockGetParams

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

UserServiceMockGetParams contains parameters of the UserService.Get

type UserServiceMockGetResults

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

UserServiceMockGetResults contains results of the UserService.Get

type UserServiceMockUpdateExpectation

type UserServiceMockUpdateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

UserServiceMockUpdateExpectation specifies expectation struct of the UserService.Update

func (*UserServiceMockUpdateExpectation) Then

Then sets up UserService.Update return parameters for the expectation previously defined by the When method

type UserServiceMockUpdateParams

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

UserServiceMockUpdateParams contains parameters of the UserService.Update

type UserServiceMockUpdateResults

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

UserServiceMockUpdateResults contains results of the UserService.Update

Jump to

Keyboard shortcuts

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