mocks

package
v0.0.0-...-e85e4ab Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 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 NewRepositoryT

type NewRepositoryT interface {
	mock.TestingT
	Cleanup(func())
}

type NewServiceT

type NewServiceT interface {
	mock.TestingT
	Cleanup(func())
}

type Repository

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository

func NewRepository(t NewRepositoryT) *Repository

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

func (*Repository) CheckProductCode

func (_m *Repository) CheckProductCode(ctx context.Context, id int, productCode string) bool

CheckProductCode provides a mock function with given fields: ctx, id, productCode

func (*Repository) CheckProductType

func (_m *Repository) CheckProductType(ctx context.Context, productTypeId int) bool

CheckProductType provides a mock function with given fields: ctx, productTypeId

func (*Repository) Delete

func (_m *Repository) Delete(ctx context.Context, id int) error

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

func (*Repository) GetAll

func (_m *Repository) GetAll(ctx context.Context) ([]products.Product, error)

GetAll provides a mock function with given fields: ctx

func (*Repository) GetById

func (_m *Repository) GetById(ctx context.Context, id int) (products.Product, error)

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

func (*Repository) Store

func (_m *Repository) Store(ctx context.Context, prod products.Product) (products.Product, error)

Store provides a mock function with given fields: ctx, prod

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, prod products.Product, id int) (products.Product, error)

Update provides a mock function with given fields: ctx, prod, id

type Service

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t NewServiceT) *Service

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

func (*Service) Delete

func (_m *Service) Delete(ctx context.Context, id int) error

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

func (*Service) GetAll

func (_m *Service) GetAll(ctx context.Context) ([]products.Product, error)

GetAll provides a mock function with given fields: ctx

func (*Service) GetById

func (_m *Service) GetById(ctx context.Context, id int) (products.Product, error)

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

func (*Service) Store

func (_m *Service) Store(ctx context.Context, prod products.Product) (products.Product, error)

Store provides a mock function with given fields: ctx, prod

func (*Service) Update

func (_m *Service) Update(ctx context.Context, prod products.Product, id int) (products.Product, error)

Update provides a mock function with given fields: ctx, prod, id

Jump to

Keyboard shortcuts

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