mocks

package
v0.0.0-...-7fad759 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTaskRepository

type MockTaskRepository struct {
	mock.Mock
}

func (*MockTaskRepository) Create

func (m *MockTaskRepository) Create(c context.Context, task *domain.Task) error

func (*MockTaskRepository) CreateBatch

func (m *MockTaskRepository) CreateBatch(c context.Context, tasks []domain.Task) error

func (*MockTaskRepository) Delete

func (m *MockTaskRepository) Delete(ctx context.Context, id string) error

func (*MockTaskRepository) FetchByUserID

func (m *MockTaskRepository) FetchByUserID(c context.Context, userID string) ([]domain.Task, error)

func (*MockTaskRepository) FetchTaskByID

func (m *MockTaskRepository) FetchTaskByID(ctx context.Context, id primitive.ObjectID) (*domain.Task, error)

func (*MockTaskRepository) FetchTasks

func (m *MockTaskRepository) FetchTasks(c context.Context, filter bson.M, projection bson.M, limit, skip int64) ([]domain.Task, error)

func (*MockTaskRepository) Update

func (m *MockTaskRepository) Update(ctx context.Context, id string, task domain.Task) error

type TaskUsecase

type TaskUsecase struct {
	mock.Mock
}

TaskUsecase is an autogenerated mock type for the TaskUsecase type

func NewTaskUsecase

func NewTaskUsecase(t interface {
	mock.TestingT
	Cleanup(func())
}) *TaskUsecase

NewTaskUsecase creates a new instance of TaskUsecase. 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 (*TaskUsecase) Create

func (_m *TaskUsecase) Create(c context.Context, task *domain.Task) error

Create provides a mock function with given fields: c, task

func (*TaskUsecase) FetchByUserID

func (_m *TaskUsecase) FetchByUserID(c context.Context, userID string) ([]domain.Task, error)

FetchByUserID provides a mock function with given fields: c, userID

Jump to

Keyboard shortcuts

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