mocks

package
v0.0.0-...-93f7374 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryMock

type RepositoryMock struct {
	CreateMock mRepositoryMockCreate

	GetListMock mRepositoryMockGetList

	IsExistMock mRepositoryMockIsExist

	UpdateMock mRepositoryMockUpdate
	// contains filtered or unexported fields
}

RepositoryMock implements student_repository.Repository

func NewRepositoryMock

func NewRepositoryMock(t minimock.Tester) *RepositoryMock

NewRepositoryMock returns a mock for student_repository.Repository

func (*RepositoryMock) Create

func (mmCreate *RepositoryMock) Create(ctx context.Context, student *model.Student) (err error)

Create implements student_repository.Repository

func (*RepositoryMock) CreateAfterCounter

func (mmCreate *RepositoryMock) CreateAfterCounter() uint64

CreateAfterCounter returns a count of finished RepositoryMock.Create invocations

func (*RepositoryMock) CreateBeforeCounter

func (mmCreate *RepositoryMock) CreateBeforeCounter() uint64

CreateBeforeCounter returns a count of RepositoryMock.Create invocations

func (*RepositoryMock) GetList

func (mmGetList *RepositoryMock) GetList(ctx context.Context, filter *mm_student_repository.Query) (spa1 []*model.Student, err error)

GetList implements student_repository.Repository

func (*RepositoryMock) GetListAfterCounter

func (mmGetList *RepositoryMock) GetListAfterCounter() uint64

GetListAfterCounter returns a count of finished RepositoryMock.GetList invocations

func (*RepositoryMock) GetListBeforeCounter

func (mmGetList *RepositoryMock) GetListBeforeCounter() uint64

GetListBeforeCounter returns a count of RepositoryMock.GetList invocations

func (*RepositoryMock) IsExist

func (mmIsExist *RepositoryMock) IsExist(ctx context.Context, telegramChatID int64) (b1 bool, err error)

IsExist implements student_repository.Repository

func (*RepositoryMock) IsExistAfterCounter

func (mmIsExist *RepositoryMock) IsExistAfterCounter() uint64

IsExistAfterCounter returns a count of finished RepositoryMock.IsExist invocations

func (*RepositoryMock) IsExistBeforeCounter

func (mmIsExist *RepositoryMock) IsExistBeforeCounter() uint64

IsExistBeforeCounter returns a count of RepositoryMock.IsExist invocations

func (*RepositoryMock) MinimockCreateDone

func (m *RepositoryMock) MinimockCreateDone() bool

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

func (*RepositoryMock) MinimockCreateInspect

func (m *RepositoryMock) MinimockCreateInspect()

MinimockCreateInspect logs each unmet expectation

func (*RepositoryMock) MinimockFinish

func (m *RepositoryMock) MinimockFinish()

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

func (*RepositoryMock) MinimockGetListDone

func (m *RepositoryMock) MinimockGetListDone() bool

MinimockGetListDone returns true if the count of the GetList invocations corresponds the number of defined expectations

func (*RepositoryMock) MinimockGetListInspect

func (m *RepositoryMock) MinimockGetListInspect()

MinimockGetListInspect logs each unmet expectation

func (*RepositoryMock) MinimockIsExistDone

func (m *RepositoryMock) MinimockIsExistDone() bool

MinimockIsExistDone returns true if the count of the IsExist invocations corresponds the number of defined expectations

func (*RepositoryMock) MinimockIsExistInspect

func (m *RepositoryMock) MinimockIsExistInspect()

MinimockIsExistInspect logs each unmet expectation

func (*RepositoryMock) MinimockUpdateDone

func (m *RepositoryMock) MinimockUpdateDone() bool

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

func (*RepositoryMock) MinimockUpdateInspect

func (m *RepositoryMock) MinimockUpdateInspect()

MinimockUpdateInspect logs each unmet expectation

func (*RepositoryMock) MinimockWait

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

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

func (*RepositoryMock) Update

func (mmUpdate *RepositoryMock) Update(ctx context.Context, telegramID int64, updateStudent *model.UpdateStudent) (err error)

Update implements student_repository.Repository

func (*RepositoryMock) UpdateAfterCounter

func (mmUpdate *RepositoryMock) UpdateAfterCounter() uint64

UpdateAfterCounter returns a count of finished RepositoryMock.Update invocations

func (*RepositoryMock) UpdateBeforeCounter

func (mmUpdate *RepositoryMock) UpdateBeforeCounter() uint64

UpdateBeforeCounter returns a count of RepositoryMock.Update invocations

type RepositoryMockCreateExpectation

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

RepositoryMockCreateExpectation specifies expectation struct of the Repository.Create

func (*RepositoryMockCreateExpectation) Then

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

type RepositoryMockCreateParams

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

RepositoryMockCreateParams contains parameters of the Repository.Create

type RepositoryMockCreateResults

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

RepositoryMockCreateResults contains results of the Repository.Create

type RepositoryMockGetListExpectation

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

RepositoryMockGetListExpectation specifies expectation struct of the Repository.GetList

func (*RepositoryMockGetListExpectation) Then

Then sets up Repository.GetList return parameters for the expectation previously defined by the When method

type RepositoryMockGetListParams

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

RepositoryMockGetListParams contains parameters of the Repository.GetList

type RepositoryMockGetListResults

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

RepositoryMockGetListResults contains results of the Repository.GetList

type RepositoryMockIsExistExpectation

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

RepositoryMockIsExistExpectation specifies expectation struct of the Repository.IsExist

func (*RepositoryMockIsExistExpectation) Then

Then sets up Repository.IsExist return parameters for the expectation previously defined by the When method

type RepositoryMockIsExistParams

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

RepositoryMockIsExistParams contains parameters of the Repository.IsExist

type RepositoryMockIsExistResults

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

RepositoryMockIsExistResults contains results of the Repository.IsExist

type RepositoryMockUpdateExpectation

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

RepositoryMockUpdateExpectation specifies expectation struct of the Repository.Update

func (*RepositoryMockUpdateExpectation) Then

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

type RepositoryMockUpdateParams

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

RepositoryMockUpdateParams contains parameters of the Repository.Update

type RepositoryMockUpdateResults

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

RepositoryMockUpdateResults contains results of the Repository.Update

Jump to

Keyboard shortcuts

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