forked from ebhomengo/niki
152 lines
4.4 KiB
Go
152 lines
4.4 KiB
Go
|
// Code generated by mockery v2.45.0. DO NOT EDIT.
|
||
|
|
||
|
package adminkindboxvalidator
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
|
||
|
entity "git.gocasts.ir/ebhomengo/niki/entity"
|
||
|
mock "github.com/stretchr/testify/mock"
|
||
|
)
|
||
|
|
||
|
// MockRepository is an autogenerated mock type for the Repository type
|
||
|
type MockRepository struct {
|
||
|
mock.Mock
|
||
|
}
|
||
|
|
||
|
type MockRepository_Expecter struct {
|
||
|
mock *mock.Mock
|
||
|
}
|
||
|
|
||
|
func (_m *MockRepository) EXPECT() *MockRepository_Expecter {
|
||
|
return &MockRepository_Expecter{mock: &_m.Mock}
|
||
|
}
|
||
|
|
||
|
// GetKindBox provides a mock function with given fields: ctx, kindBoxID
|
||
|
func (_m *MockRepository) GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error) {
|
||
|
ret := _m.Called(ctx, kindBoxID)
|
||
|
|
||
|
if len(ret) == 0 {
|
||
|
panic("no return value specified for GetKindBox")
|
||
|
}
|
||
|
|
||
|
var r0 entity.KindBox
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, uint) (entity.KindBox, error)); ok {
|
||
|
return rf(ctx, kindBoxID)
|
||
|
}
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, uint) entity.KindBox); ok {
|
||
|
r0 = rf(ctx, kindBoxID)
|
||
|
} else {
|
||
|
r0 = ret.Get(0).(entity.KindBox)
|
||
|
}
|
||
|
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok {
|
||
|
r1 = rf(ctx, kindBoxID)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// MockRepository_GetKindBox_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKindBox'
|
||
|
type MockRepository_GetKindBox_Call struct {
|
||
|
*mock.Call
|
||
|
}
|
||
|
|
||
|
// GetKindBox is a helper method to define mock.On call
|
||
|
// - ctx context.Context
|
||
|
// - kindBoxID uint
|
||
|
func (_e *MockRepository_Expecter) GetKindBox(ctx interface{}, kindBoxID interface{}) *MockRepository_GetKindBox_Call {
|
||
|
return &MockRepository_GetKindBox_Call{Call: _e.mock.On("GetKindBox", ctx, kindBoxID)}
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_GetKindBox_Call) Run(run func(ctx context.Context, kindBoxID uint)) *MockRepository_GetKindBox_Call {
|
||
|
_c.Call.Run(func(args mock.Arguments) {
|
||
|
run(args[0].(context.Context), args[1].(uint))
|
||
|
})
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_GetKindBox_Call) Return(_a0 entity.KindBox, _a1 error) *MockRepository_GetKindBox_Call {
|
||
|
_c.Call.Return(_a0, _a1)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_GetKindBox_Call) RunAndReturn(run func(context.Context, uint) (entity.KindBox, error)) *MockRepository_GetKindBox_Call {
|
||
|
_c.Call.Return(run)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
// KindBoxExist provides a mock function with given fields: ctx, kindBoxID
|
||
|
func (_m *MockRepository) KindBoxExist(ctx context.Context, kindBoxID uint) (bool, error) {
|
||
|
ret := _m.Called(ctx, kindBoxID)
|
||
|
|
||
|
if len(ret) == 0 {
|
||
|
panic("no return value specified for KindBoxExist")
|
||
|
}
|
||
|
|
||
|
var r0 bool
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, uint) (bool, error)); ok {
|
||
|
return rf(ctx, kindBoxID)
|
||
|
}
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, uint) bool); ok {
|
||
|
r0 = rf(ctx, kindBoxID)
|
||
|
} else {
|
||
|
r0 = ret.Get(0).(bool)
|
||
|
}
|
||
|
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok {
|
||
|
r1 = rf(ctx, kindBoxID)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// MockRepository_KindBoxExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KindBoxExist'
|
||
|
type MockRepository_KindBoxExist_Call struct {
|
||
|
*mock.Call
|
||
|
}
|
||
|
|
||
|
// KindBoxExist is a helper method to define mock.On call
|
||
|
// - ctx context.Context
|
||
|
// - kindBoxID uint
|
||
|
func (_e *MockRepository_Expecter) KindBoxExist(ctx interface{}, kindBoxID interface{}) *MockRepository_KindBoxExist_Call {
|
||
|
return &MockRepository_KindBoxExist_Call{Call: _e.mock.On("KindBoxExist", ctx, kindBoxID)}
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_KindBoxExist_Call) Run(run func(ctx context.Context, kindBoxID uint)) *MockRepository_KindBoxExist_Call {
|
||
|
_c.Call.Run(func(args mock.Arguments) {
|
||
|
run(args[0].(context.Context), args[1].(uint))
|
||
|
})
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_KindBoxExist_Call) Return(_a0 bool, _a1 error) *MockRepository_KindBoxExist_Call {
|
||
|
_c.Call.Return(_a0, _a1)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockRepository_KindBoxExist_Call) RunAndReturn(run func(context.Context, uint) (bool, error)) *MockRepository_KindBoxExist_Call {
|
||
|
_c.Call.Return(run)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
// NewMockRepository creates a new instance of MockRepository. 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 NewMockRepository(t interface {
|
||
|
mock.TestingT
|
||
|
Cleanup(func())
|
||
|
}) *MockRepository {
|
||
|
mock := &MockRepository{}
|
||
|
mock.Mock.Test(t)
|
||
|
|
||
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||
|
|
||
|
return mock
|
||
|
}
|