log/mock_systemService.go (417 lines of code) (raw):

// Code generated by mockery v2.53.3. DO NOT EDIT. package log import ( service "github.com/kardianos/service" mock "github.com/stretchr/testify/mock" ) // mockSystemService is an autogenerated mock type for the systemService type type mockSystemService struct { mock.Mock } type mockSystemService_Expecter struct { mock *mock.Mock } func (_m *mockSystemService) EXPECT() *mockSystemService_Expecter { return &mockSystemService_Expecter{mock: &_m.Mock} } // Install provides a mock function with no fields func (_m *mockSystemService) Install() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Install") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Install_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Install' type mockSystemService_Install_Call struct { *mock.Call } // Install is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Install() *mockSystemService_Install_Call { return &mockSystemService_Install_Call{Call: _e.mock.On("Install")} } func (_c *mockSystemService_Install_Call) Run(run func()) *mockSystemService_Install_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Install_Call) Return(_a0 error) *mockSystemService_Install_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Install_Call) RunAndReturn(run func() error) *mockSystemService_Install_Call { _c.Call.Return(run) return _c } // Logger provides a mock function with given fields: errs func (_m *mockSystemService) Logger(errs chan<- error) (service.Logger, error) { ret := _m.Called(errs) if len(ret) == 0 { panic("no return value specified for Logger") } var r0 service.Logger var r1 error if rf, ok := ret.Get(0).(func(chan<- error) (service.Logger, error)); ok { return rf(errs) } if rf, ok := ret.Get(0).(func(chan<- error) service.Logger); ok { r0 = rf(errs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(service.Logger) } } if rf, ok := ret.Get(1).(func(chan<- error) error); ok { r1 = rf(errs) } else { r1 = ret.Error(1) } return r0, r1 } // mockSystemService_Logger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logger' type mockSystemService_Logger_Call struct { *mock.Call } // Logger is a helper method to define mock.On call // - errs chan<- error func (_e *mockSystemService_Expecter) Logger(errs interface{}) *mockSystemService_Logger_Call { return &mockSystemService_Logger_Call{Call: _e.mock.On("Logger", errs)} } func (_c *mockSystemService_Logger_Call) Run(run func(errs chan<- error)) *mockSystemService_Logger_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(chan<- error)) }) return _c } func (_c *mockSystemService_Logger_Call) Return(_a0 service.Logger, _a1 error) *mockSystemService_Logger_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *mockSystemService_Logger_Call) RunAndReturn(run func(chan<- error) (service.Logger, error)) *mockSystemService_Logger_Call { _c.Call.Return(run) return _c } // Platform provides a mock function with no fields func (_m *mockSystemService) Platform() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Platform") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // mockSystemService_Platform_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Platform' type mockSystemService_Platform_Call struct { *mock.Call } // Platform is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Platform() *mockSystemService_Platform_Call { return &mockSystemService_Platform_Call{Call: _e.mock.On("Platform")} } func (_c *mockSystemService_Platform_Call) Run(run func()) *mockSystemService_Platform_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Platform_Call) Return(_a0 string) *mockSystemService_Platform_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Platform_Call) RunAndReturn(run func() string) *mockSystemService_Platform_Call { _c.Call.Return(run) return _c } // Restart provides a mock function with no fields func (_m *mockSystemService) Restart() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Restart") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart' type mockSystemService_Restart_Call struct { *mock.Call } // Restart is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Restart() *mockSystemService_Restart_Call { return &mockSystemService_Restart_Call{Call: _e.mock.On("Restart")} } func (_c *mockSystemService_Restart_Call) Run(run func()) *mockSystemService_Restart_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Restart_Call) Return(_a0 error) *mockSystemService_Restart_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Restart_Call) RunAndReturn(run func() error) *mockSystemService_Restart_Call { _c.Call.Return(run) return _c } // Run provides a mock function with no fields func (_m *mockSystemService) Run() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Run") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' type mockSystemService_Run_Call struct { *mock.Call } // Run is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Run() *mockSystemService_Run_Call { return &mockSystemService_Run_Call{Call: _e.mock.On("Run")} } func (_c *mockSystemService_Run_Call) Run(run func()) *mockSystemService_Run_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Run_Call) Return(_a0 error) *mockSystemService_Run_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Run_Call) RunAndReturn(run func() error) *mockSystemService_Run_Call { _c.Call.Return(run) return _c } // Start provides a mock function with no fields func (_m *mockSystemService) Start() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Start") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' type mockSystemService_Start_Call struct { *mock.Call } // Start is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Start() *mockSystemService_Start_Call { return &mockSystemService_Start_Call{Call: _e.mock.On("Start")} } func (_c *mockSystemService_Start_Call) Run(run func()) *mockSystemService_Start_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Start_Call) Return(_a0 error) *mockSystemService_Start_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Start_Call) RunAndReturn(run func() error) *mockSystemService_Start_Call { _c.Call.Return(run) return _c } // Status provides a mock function with no fields func (_m *mockSystemService) Status() (service.Status, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Status") } var r0 service.Status var r1 error if rf, ok := ret.Get(0).(func() (service.Status, error)); ok { return rf() } if rf, ok := ret.Get(0).(func() service.Status); ok { r0 = rf() } else { r0 = ret.Get(0).(service.Status) } if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { r1 = ret.Error(1) } return r0, r1 } // mockSystemService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' type mockSystemService_Status_Call struct { *mock.Call } // Status is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Status() *mockSystemService_Status_Call { return &mockSystemService_Status_Call{Call: _e.mock.On("Status")} } func (_c *mockSystemService_Status_Call) Run(run func()) *mockSystemService_Status_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Status_Call) Return(_a0 service.Status, _a1 error) *mockSystemService_Status_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *mockSystemService_Status_Call) RunAndReturn(run func() (service.Status, error)) *mockSystemService_Status_Call { _c.Call.Return(run) return _c } // Stop provides a mock function with no fields func (_m *mockSystemService) Stop() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Stop") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' type mockSystemService_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Stop() *mockSystemService_Stop_Call { return &mockSystemService_Stop_Call{Call: _e.mock.On("Stop")} } func (_c *mockSystemService_Stop_Call) Run(run func()) *mockSystemService_Stop_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Stop_Call) Return(_a0 error) *mockSystemService_Stop_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Stop_Call) RunAndReturn(run func() error) *mockSystemService_Stop_Call { _c.Call.Return(run) return _c } // String provides a mock function with no fields func (_m *mockSystemService) String() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for String") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // mockSystemService_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' type mockSystemService_String_Call struct { *mock.Call } // String is a helper method to define mock.On call func (_e *mockSystemService_Expecter) String() *mockSystemService_String_Call { return &mockSystemService_String_Call{Call: _e.mock.On("String")} } func (_c *mockSystemService_String_Call) Run(run func()) *mockSystemService_String_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_String_Call) Return(_a0 string) *mockSystemService_String_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_String_Call) RunAndReturn(run func() string) *mockSystemService_String_Call { _c.Call.Return(run) return _c } // SystemLogger provides a mock function with given fields: errs func (_m *mockSystemService) SystemLogger(errs chan<- error) (service.Logger, error) { ret := _m.Called(errs) if len(ret) == 0 { panic("no return value specified for SystemLogger") } var r0 service.Logger var r1 error if rf, ok := ret.Get(0).(func(chan<- error) (service.Logger, error)); ok { return rf(errs) } if rf, ok := ret.Get(0).(func(chan<- error) service.Logger); ok { r0 = rf(errs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(service.Logger) } } if rf, ok := ret.Get(1).(func(chan<- error) error); ok { r1 = rf(errs) } else { r1 = ret.Error(1) } return r0, r1 } // mockSystemService_SystemLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SystemLogger' type mockSystemService_SystemLogger_Call struct { *mock.Call } // SystemLogger is a helper method to define mock.On call // - errs chan<- error func (_e *mockSystemService_Expecter) SystemLogger(errs interface{}) *mockSystemService_SystemLogger_Call { return &mockSystemService_SystemLogger_Call{Call: _e.mock.On("SystemLogger", errs)} } func (_c *mockSystemService_SystemLogger_Call) Run(run func(errs chan<- error)) *mockSystemService_SystemLogger_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(chan<- error)) }) return _c } func (_c *mockSystemService_SystemLogger_Call) Return(_a0 service.Logger, _a1 error) *mockSystemService_SystemLogger_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *mockSystemService_SystemLogger_Call) RunAndReturn(run func(chan<- error) (service.Logger, error)) *mockSystemService_SystemLogger_Call { _c.Call.Return(run) return _c } // Uninstall provides a mock function with no fields func (_m *mockSystemService) Uninstall() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Uninstall") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // mockSystemService_Uninstall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninstall' type mockSystemService_Uninstall_Call struct { *mock.Call } // Uninstall is a helper method to define mock.On call func (_e *mockSystemService_Expecter) Uninstall() *mockSystemService_Uninstall_Call { return &mockSystemService_Uninstall_Call{Call: _e.mock.On("Uninstall")} } func (_c *mockSystemService_Uninstall_Call) Run(run func()) *mockSystemService_Uninstall_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockSystemService_Uninstall_Call) Return(_a0 error) *mockSystemService_Uninstall_Call { _c.Call.Return(_a0) return _c } func (_c *mockSystemService_Uninstall_Call) RunAndReturn(run func() error) *mockSystemService_Uninstall_Call { _c.Call.Return(run) return _c } // newMockSystemService creates a new instance of mockSystemService. 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 newMockSystemService(t interface { mock.TestingT Cleanup(func()) }) *mockSystemService { mock := &mockSystemService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }