mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:40:59 +08:00
139 lines
3.5 KiB
Go
139 lines
3.5 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package biz
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// SafeRepo is an autogenerated mock type for the SafeRepo type
|
|
type SafeRepo struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type SafeRepo_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *SafeRepo) EXPECT() *SafeRepo_Expecter {
|
|
return &SafeRepo_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetPingStatus provides a mock function with no fields
|
|
func (_m *SafeRepo) GetPingStatus() (bool, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetPingStatus")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SafeRepo_GetPingStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPingStatus'
|
|
type SafeRepo_GetPingStatus_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetPingStatus is a helper method to define mock.On call
|
|
func (_e *SafeRepo_Expecter) GetPingStatus() *SafeRepo_GetPingStatus_Call {
|
|
return &SafeRepo_GetPingStatus_Call{Call: _e.mock.On("GetPingStatus")}
|
|
}
|
|
|
|
func (_c *SafeRepo_GetPingStatus_Call) Run(run func()) *SafeRepo_GetPingStatus_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *SafeRepo_GetPingStatus_Call) Return(_a0 bool, _a1 error) *SafeRepo_GetPingStatus_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *SafeRepo_GetPingStatus_Call) RunAndReturn(run func() (bool, error)) *SafeRepo_GetPingStatus_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdatePingStatus provides a mock function with given fields: ctx, status
|
|
func (_m *SafeRepo) UpdatePingStatus(ctx context.Context, status bool) error {
|
|
ret := _m.Called(ctx, status)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdatePingStatus")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, bool) error); ok {
|
|
r0 = rf(ctx, status)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SafeRepo_UpdatePingStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePingStatus'
|
|
type SafeRepo_UpdatePingStatus_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdatePingStatus is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - status bool
|
|
func (_e *SafeRepo_Expecter) UpdatePingStatus(ctx interface{}, status interface{}) *SafeRepo_UpdatePingStatus_Call {
|
|
return &SafeRepo_UpdatePingStatus_Call{Call: _e.mock.On("UpdatePingStatus", ctx, status)}
|
|
}
|
|
|
|
func (_c *SafeRepo_UpdatePingStatus_Call) Run(run func(ctx context.Context, status bool)) *SafeRepo_UpdatePingStatus_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *SafeRepo_UpdatePingStatus_Call) Return(_a0 error) *SafeRepo_UpdatePingStatus_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *SafeRepo_UpdatePingStatus_Call) RunAndReturn(run func(context.Context, bool) error) *SafeRepo_UpdatePingStatus_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewSafeRepo creates a new instance of SafeRepo. 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 NewSafeRepo(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *SafeRepo {
|
|
mock := &SafeRepo{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|