Co-authored-by: hermes <hermes@noreply.localhost> Co-committed-by: hermes <hermes@noreply.localhost>
200 lines
6.1 KiB
Go
200 lines
6.1 KiB
Go
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
domain "git.loyso.art/frx/kurious/internal/kurious/domain"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// LearningCategoryRepository is an autogenerated mock type for the LearningCategoryRepository type
|
|
type LearningCategoryRepository struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type LearningCategoryRepository_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *LearningCategoryRepository) EXPECT() *LearningCategoryRepository_Expecter {
|
|
return &LearningCategoryRepository_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Get provides a mock function with given fields: _a0, _a1
|
|
func (_m *LearningCategoryRepository) Get(_a0 context.Context, _a1 string) (domain.LearningCategory, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 domain.LearningCategory
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (domain.LearningCategory, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) domain.LearningCategory); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Get(0).(domain.LearningCategory)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LearningCategoryRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
|
|
type LearningCategoryRepository_Get_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Get is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 string
|
|
func (_e *LearningCategoryRepository_Expecter) Get(_a0 interface{}, _a1 interface{}) *LearningCategoryRepository_Get_Call {
|
|
return &LearningCategoryRepository_Get_Call{Call: _e.mock.On("Get", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Get_Call) Run(run func(_a0 context.Context, _a1 string)) *LearningCategoryRepository_Get_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Get_Call) Return(_a0 domain.LearningCategory, _a1 error) *LearningCategoryRepository_Get_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Get_Call) RunAndReturn(run func(context.Context, string) (domain.LearningCategory, error)) *LearningCategoryRepository_Get_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// List provides a mock function with given fields: _a0
|
|
func (_m *LearningCategoryRepository) List(_a0 context.Context) ([]domain.LearningCategory, error) {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for List")
|
|
}
|
|
|
|
var r0 []domain.LearningCategory
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]domain.LearningCategory, error)); ok {
|
|
return rf(_a0)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []domain.LearningCategory); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]domain.LearningCategory)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(_a0)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LearningCategoryRepository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type LearningCategoryRepository_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
func (_e *LearningCategoryRepository_Expecter) List(_a0 interface{}) *LearningCategoryRepository_List_Call {
|
|
return &LearningCategoryRepository_List_Call{Call: _e.mock.On("List", _a0)}
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_List_Call) Run(run func(_a0 context.Context)) *LearningCategoryRepository_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_List_Call) Return(_a0 []domain.LearningCategory, _a1 error) *LearningCategoryRepository_List_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_List_Call) RunAndReturn(run func(context.Context) ([]domain.LearningCategory, error)) *LearningCategoryRepository_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Upsert provides a mock function with given fields: _a0, _a1
|
|
func (_m *LearningCategoryRepository) Upsert(_a0 context.Context, _a1 domain.LearningCategory) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Upsert")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, domain.LearningCategory) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// LearningCategoryRepository_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'
|
|
type LearningCategoryRepository_Upsert_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Upsert is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 domain.LearningCategory
|
|
func (_e *LearningCategoryRepository_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *LearningCategoryRepository_Upsert_Call {
|
|
return &LearningCategoryRepository_Upsert_Call{Call: _e.mock.On("Upsert", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Upsert_Call) Run(run func(_a0 context.Context, _a1 domain.LearningCategory)) *LearningCategoryRepository_Upsert_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(domain.LearningCategory))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Upsert_Call) Return(_a0 error) *LearningCategoryRepository_Upsert_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LearningCategoryRepository_Upsert_Call) RunAndReturn(run func(context.Context, domain.LearningCategory) error) *LearningCategoryRepository_Upsert_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewLearningCategoryRepository creates a new instance of LearningCategoryRepository. 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 NewLearningCategoryRepository(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *LearningCategoryRepository {
|
|
mock := &LearningCategoryRepository{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|