mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 14:57:16 +08:00
95 lines
2.3 KiB
Go
95 lines
2.3 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package biz
|
|
|
|
import (
|
|
biz "github.com/acepanel/panel/internal/biz"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// LogRepo is an autogenerated mock type for the LogRepo type
|
|
type LogRepo struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type LogRepo_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *LogRepo) EXPECT() *LogRepo_Expecter {
|
|
return &LogRepo_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// List provides a mock function with given fields: logType, limit
|
|
func (_m *LogRepo) List(logType string, limit int) ([]biz.LogEntry, error) {
|
|
ret := _m.Called(logType, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for List")
|
|
}
|
|
|
|
var r0 []biz.LogEntry
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int) ([]biz.LogEntry, error)); ok {
|
|
return rf(logType, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int) []biz.LogEntry); ok {
|
|
r0 = rf(logType, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]biz.LogEntry)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int) error); ok {
|
|
r1 = rf(logType, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LogRepo_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type LogRepo_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - logType string
|
|
// - limit int
|
|
func (_e *LogRepo_Expecter) List(logType interface{}, limit interface{}) *LogRepo_List_Call {
|
|
return &LogRepo_List_Call{Call: _e.mock.On("List", logType, limit)}
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) Run(run func(logType string, limit int)) *LogRepo_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) Return(_a0 []biz.LogEntry, _a1 error) *LogRepo_List_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) RunAndReturn(run func(string, int) ([]biz.LogEntry, error)) *LogRepo_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewLogRepo creates a new instance of LogRepo. 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 NewLogRepo(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *LogRepo {
|
|
mock := &LogRepo{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|