diff --git a/core/.mockery.yml b/core/.mockery.yml index f84f82c0..415cb2eb 100644 --- a/core/.mockery.yml +++ b/core/.mockery.yml @@ -1,82 +1,85 @@ -with-expecter: true -dir: "internal/mocks/{{.InterfaceDirRelative}}" -mockname: "Mock{{.InterfaceName}}" -outpkg: "{{.PackageName}}" +dir: internal/mocks/{{.InterfaceDirRelative}} +structname: Mock{{.InterfaceName}} +pkgname: '{{.SrcPackageName}}' +filename: 'mock_{{.InterfaceName}}.go' +template: testify +template-data: + unroll-variadic: true packages: - github.com/Wifx/gonetworkmanager/v2: - interfaces: - NetworkManager: - Device: - DeviceWireless: - AccessPoint: - Connection: - Settings: - ActiveConnection: - IP4Config: - net: - interfaces: - Conn: - github.com/AvengeMedia/danklinux/internal/plugins: - interfaces: - GitClient: - github.com/godbus/dbus/v5: - interfaces: - BusObject: - github.com/AvengeMedia/danklinux/internal/server/brightness: - config: - dir: "internal/mocks/brightness" - outpkg: mocks_brightness - interfaces: - DBusConn: github.com/AvengeMedia/DankMaterialShell/core/internal/geolocation: config: - dir: "internal/mocks/geolocation" - outpkg: mocks_geolocation + dir: internal/mocks/geolocation + pkgname: mocks_geolocation interfaces: - Client: - github.com/AvengeMedia/DankMaterialShell/core/internal/server/network: - config: - dir: "internal/mocks/network" - outpkg: mocks_network - interfaces: - Backend: + Client: {} github.com/AvengeMedia/DankMaterialShell/core/internal/server/cups: config: - dir: "internal/mocks/cups" - outpkg: mocks_cups + dir: internal/mocks/cups + pkgname: mocks_cups interfaces: - CUPSClientInterface: + CUPSClientInterface: {} PkHelper: config: - dir: "internal/mocks/cups_pkhelper" - outpkg: mocks_cups_pkhelper + dir: internal/mocks/cups_pkhelper + pkgname: mocks_cups_pkhelper github.com/AvengeMedia/DankMaterialShell/core/internal/server/evdev: config: - dir: "internal/mocks/evdev" - outpkg: mocks_evdev + dir: internal/mocks/evdev + pkgname: mocks_evdev interfaces: - EvdevDevice: - github.com/AvengeMedia/DankMaterialShell/core/internal/version: + EvdevDevice: {} + github.com/AvengeMedia/DankMaterialShell/core/internal/server/network: config: - dir: "internal/mocks/version" - outpkg: mocks_version + dir: internal/mocks/network + pkgname: mocks_network interfaces: - VersionFetcher: + Backend: {} github.com/AvengeMedia/DankMaterialShell/core/internal/server/wlcontext: config: - dir: "internal/mocks/wlcontext" - outpkg: mocks_wlcontext + dir: internal/mocks/wlcontext + pkgname: mocks_wlcontext interfaces: - WaylandContext: - github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client: - config: - dir: "internal/mocks/wlclient" - outpkg: mocks_wlclient - interfaces: - WaylandDisplay: + WaylandContext: {} github.com/AvengeMedia/DankMaterialShell/core/internal/utils: config: - dir: "internal/mocks/utils" - outpkg: mocks_utils + dir: internal/mocks/utils + pkgname: mocks_utils interfaces: - AppChecker: + AppChecker: {} + github.com/AvengeMedia/DankMaterialShell/core/internal/version: + config: + dir: internal/mocks/version + pkgname: mocks_version + interfaces: + VersionFetcher: {} + github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client: + config: + dir: internal/mocks/wlclient + pkgname: mocks_wlclient + interfaces: + WaylandDisplay: {} + github.com/AvengeMedia/DankMaterialShell/core/internal/plugins: + interfaces: + GitClient: {} + github.com/AvengeMedia/DankMaterialShell/core/internal/server/brightness: + config: + dir: internal/mocks/brightness + pkgname: mocks_brightness + interfaces: + DBusConn: {} + github.com/Wifx/gonetworkmanager/v2: + interfaces: + AccessPoint: {} + ActiveConnection: {} + Connection: {} + Device: {} + DeviceWireless: {} + IP4Config: {} + NetworkManager: {} + Settings: {} + github.com/godbus/dbus/v5: + interfaces: + BusObject: {} + net: + interfaces: + Conn: {} diff --git a/core/internal/mocks/brightness/mock_DBusConn.go b/core/internal/mocks/brightness/mock_DBusConn.go index ce9472d3..114c5091 100644 --- a/core/internal/mocks/brightness/mock_DBusConn.go +++ b/core/internal/mocks/brightness/mock_DBusConn.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_brightness import ( - dbus "github.com/godbus/dbus/v5" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockDBusConn creates a new instance of MockDBusConn. 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 NewMockDBusConn(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDBusConn { + mock := &MockDBusConn{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockDBusConn is an autogenerated mock type for the DBusConn type type MockDBusConn struct { mock.Mock @@ -20,21 +36,20 @@ func (_m *MockDBusConn) EXPECT() *MockDBusConn_Expecter { return &MockDBusConn_Expecter{mock: &_m.Mock} } -// Close provides a mock function with no fields -func (_m *MockDBusConn) Close() error { - ret := _m.Called() +// Close provides a mock function for the type MockDBusConn +func (_mock *MockDBusConn) Close() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -55,8 +70,8 @@ func (_c *MockDBusConn_Close_Call) Run(run func()) *MockDBusConn_Close_Call { return _c } -func (_c *MockDBusConn_Close_Call) Return(_a0 error) *MockDBusConn_Close_Call { - _c.Call.Return(_a0) +func (_c *MockDBusConn_Close_Call) Return(err error) *MockDBusConn_Close_Call { + _c.Call.Return(err) return _c } @@ -65,23 +80,22 @@ func (_c *MockDBusConn_Close_Call) RunAndReturn(run func() error) *MockDBusConn_ return _c } -// Object provides a mock function with given fields: dest, path -func (_m *MockDBusConn) Object(dest string, path dbus.ObjectPath) dbus.BusObject { - ret := _m.Called(dest, path) +// Object provides a mock function for the type MockDBusConn +func (_mock *MockDBusConn) Object(dest string, path dbus.ObjectPath) dbus.BusObject { + ret := _mock.Called(dest, path) if len(ret) == 0 { panic("no return value specified for Object") } var r0 dbus.BusObject - if rf, ok := ret.Get(0).(func(string, dbus.ObjectPath) dbus.BusObject); ok { - r0 = rf(dest, path) + if returnFunc, ok := ret.Get(0).(func(string, dbus.ObjectPath) dbus.BusObject); ok { + r0 = returnFunc(dest, path) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(dbus.BusObject) } } - return r0 } @@ -99,32 +113,28 @@ func (_e *MockDBusConn_Expecter) Object(dest any, path any) *MockDBusConn_Object func (_c *MockDBusConn_Object_Call) Run(run func(dest string, path dbus.ObjectPath)) *MockDBusConn_Object_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(dbus.ObjectPath)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 dbus.ObjectPath + if args[1] != nil { + arg1 = args[1].(dbus.ObjectPath) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockDBusConn_Object_Call) Return(_a0 dbus.BusObject) *MockDBusConn_Object_Call { - _c.Call.Return(_a0) +func (_c *MockDBusConn_Object_Call) Return(busObject dbus.BusObject) *MockDBusConn_Object_Call { + _c.Call.Return(busObject) return _c } -func (_c *MockDBusConn_Object_Call) RunAndReturn(run func(string, dbus.ObjectPath) dbus.BusObject) *MockDBusConn_Object_Call { +func (_c *MockDBusConn_Object_Call) RunAndReturn(run func(dest string, path dbus.ObjectPath) dbus.BusObject) *MockDBusConn_Object_Call { _c.Call.Return(run) return _c } - -// NewMockDBusConn creates a new instance of MockDBusConn. 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 NewMockDBusConn(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockDBusConn { - mock := &MockDBusConn{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/cups/mock_CUPSClientInterface.go b/core/internal/mocks/cups/mock_CUPSClientInterface.go index 3c980747..10bb3b1e 100644 --- a/core/internal/mocks/cups/mock_CUPSClientInterface.go +++ b/core/internal/mocks/cups/mock_CUPSClientInterface.go @@ -1,14 +1,30 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_cups import ( - io "io" + "io" - ipp "github.com/AvengeMedia/DankMaterialShell/core/pkg/ipp" + "github.com/AvengeMedia/DankMaterialShell/core/pkg/ipp" mock "github.com/stretchr/testify/mock" ) +// NewMockCUPSClientInterface creates a new instance of MockCUPSClientInterface. 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 NewMockCUPSClientInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockCUPSClientInterface { + mock := &MockCUPSClientInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockCUPSClientInterface is an autogenerated mock type for the CUPSClientInterface type type MockCUPSClientInterface struct { mock.Mock @@ -22,21 +38,20 @@ func (_m *MockCUPSClientInterface) EXPECT() *MockCUPSClientInterface_Expecter { return &MockCUPSClientInterface_Expecter{mock: &_m.Mock} } -// AcceptJobs provides a mock function with given fields: printer -func (_m *MockCUPSClientInterface) AcceptJobs(printer string) error { - ret := _m.Called(printer) +// AcceptJobs provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) AcceptJobs(printer string) error { + ret := _mock.Called(printer) if len(ret) == 0 { panic("no return value specified for AcceptJobs") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(printer) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(printer) } else { r0 = ret.Error(0) } - return r0 } @@ -47,42 +62,47 @@ type MockCUPSClientInterface_AcceptJobs_Call struct { // AcceptJobs is a helper method to define mock.On call // - printer string -func (_e *MockCUPSClientInterface_Expecter) AcceptJobs(printer interface{}) *MockCUPSClientInterface_AcceptJobs_Call { +func (_e *MockCUPSClientInterface_Expecter) AcceptJobs(printer any) *MockCUPSClientInterface_AcceptJobs_Call { return &MockCUPSClientInterface_AcceptJobs_Call{Call: _e.mock.On("AcceptJobs", printer)} } func (_c *MockCUPSClientInterface_AcceptJobs_Call) Run(run func(printer string)) *MockCUPSClientInterface_AcceptJobs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_AcceptJobs_Call) Return(_a0 error) *MockCUPSClientInterface_AcceptJobs_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_AcceptJobs_Call) Return(err error) *MockCUPSClientInterface_AcceptJobs_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_AcceptJobs_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_AcceptJobs_Call { +func (_c *MockCUPSClientInterface_AcceptJobs_Call) RunAndReturn(run func(printer string) error) *MockCUPSClientInterface_AcceptJobs_Call { _c.Call.Return(run) return _c } -// AddPrinterToClass provides a mock function with given fields: class, printer -func (_m *MockCUPSClientInterface) AddPrinterToClass(class string, printer string) error { - ret := _m.Called(class, printer) +// AddPrinterToClass provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) AddPrinterToClass(class string, printer string) error { + ret := _mock.Called(class, printer) if len(ret) == 0 { panic("no return value specified for AddPrinterToClass") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(class, printer) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(class, printer) } else { r0 = ret.Error(0) } - return r0 } @@ -94,42 +114,52 @@ type MockCUPSClientInterface_AddPrinterToClass_Call struct { // AddPrinterToClass is a helper method to define mock.On call // - class string // - printer string -func (_e *MockCUPSClientInterface_Expecter) AddPrinterToClass(class interface{}, printer interface{}) *MockCUPSClientInterface_AddPrinterToClass_Call { +func (_e *MockCUPSClientInterface_Expecter) AddPrinterToClass(class any, printer any) *MockCUPSClientInterface_AddPrinterToClass_Call { return &MockCUPSClientInterface_AddPrinterToClass_Call{Call: _e.mock.On("AddPrinterToClass", class, printer)} } func (_c *MockCUPSClientInterface_AddPrinterToClass_Call) Run(run func(class string, printer string)) *MockCUPSClientInterface_AddPrinterToClass_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_AddPrinterToClass_Call) Return(_a0 error) *MockCUPSClientInterface_AddPrinterToClass_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_AddPrinterToClass_Call) Return(err error) *MockCUPSClientInterface_AddPrinterToClass_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_AddPrinterToClass_Call) RunAndReturn(run func(string, string) error) *MockCUPSClientInterface_AddPrinterToClass_Call { +func (_c *MockCUPSClientInterface_AddPrinterToClass_Call) RunAndReturn(run func(class string, printer string) error) *MockCUPSClientInterface_AddPrinterToClass_Call { _c.Call.Return(run) return _c } -// CancelAllJob provides a mock function with given fields: printer, purge -func (_m *MockCUPSClientInterface) CancelAllJob(printer string, purge bool) error { - ret := _m.Called(printer, purge) +// CancelAllJob provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) CancelAllJob(printer string, purge bool) error { + ret := _mock.Called(printer, purge) if len(ret) == 0 { panic("no return value specified for CancelAllJob") } var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(printer, purge) + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(printer, purge) } else { r0 = ret.Error(0) } - return r0 } @@ -141,42 +171,52 @@ type MockCUPSClientInterface_CancelAllJob_Call struct { // CancelAllJob is a helper method to define mock.On call // - printer string // - purge bool -func (_e *MockCUPSClientInterface_Expecter) CancelAllJob(printer interface{}, purge interface{}) *MockCUPSClientInterface_CancelAllJob_Call { +func (_e *MockCUPSClientInterface_Expecter) CancelAllJob(printer any, purge any) *MockCUPSClientInterface_CancelAllJob_Call { return &MockCUPSClientInterface_CancelAllJob_Call{Call: _e.mock.On("CancelAllJob", printer, purge)} } func (_c *MockCUPSClientInterface_CancelAllJob_Call) Run(run func(printer string, purge bool)) *MockCUPSClientInterface_CancelAllJob_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_CancelAllJob_Call) Return(_a0 error) *MockCUPSClientInterface_CancelAllJob_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_CancelAllJob_Call) Return(err error) *MockCUPSClientInterface_CancelAllJob_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_CancelAllJob_Call) RunAndReturn(run func(string, bool) error) *MockCUPSClientInterface_CancelAllJob_Call { +func (_c *MockCUPSClientInterface_CancelAllJob_Call) RunAndReturn(run func(printer string, purge bool) error) *MockCUPSClientInterface_CancelAllJob_Call { _c.Call.Return(run) return _c } -// CancelJob provides a mock function with given fields: jobID, purge -func (_m *MockCUPSClientInterface) CancelJob(jobID int, purge bool) error { - ret := _m.Called(jobID, purge) +// CancelJob provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) CancelJob(jobID int, purge bool) error { + ret := _mock.Called(jobID, purge) if len(ret) == 0 { panic("no return value specified for CancelJob") } var r0 error - if rf, ok := ret.Get(0).(func(int, bool) error); ok { - r0 = rf(jobID, purge) + if returnFunc, ok := ret.Get(0).(func(int, bool) error); ok { + r0 = returnFunc(jobID, purge) } else { r0 = ret.Error(0) } - return r0 } @@ -188,42 +228,52 @@ type MockCUPSClientInterface_CancelJob_Call struct { // CancelJob is a helper method to define mock.On call // - jobID int // - purge bool -func (_e *MockCUPSClientInterface_Expecter) CancelJob(jobID interface{}, purge interface{}) *MockCUPSClientInterface_CancelJob_Call { +func (_e *MockCUPSClientInterface_Expecter) CancelJob(jobID any, purge any) *MockCUPSClientInterface_CancelJob_Call { return &MockCUPSClientInterface_CancelJob_Call{Call: _e.mock.On("CancelJob", jobID, purge)} } func (_c *MockCUPSClientInterface_CancelJob_Call) Run(run func(jobID int, purge bool)) *MockCUPSClientInterface_CancelJob_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(bool)) + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_CancelJob_Call) Return(_a0 error) *MockCUPSClientInterface_CancelJob_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_CancelJob_Call) Return(err error) *MockCUPSClientInterface_CancelJob_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_CancelJob_Call) RunAndReturn(run func(int, bool) error) *MockCUPSClientInterface_CancelJob_Call { +func (_c *MockCUPSClientInterface_CancelJob_Call) RunAndReturn(run func(jobID int, purge bool) error) *MockCUPSClientInterface_CancelJob_Call { _c.Call.Return(run) return _c } -// CreatePrinter provides a mock function with given fields: name, deviceURI, ppd, shared, errorPolicy, information, location -func (_m *MockCUPSClientInterface) CreatePrinter(name string, deviceURI string, ppd string, shared bool, errorPolicy string, information string, location string) error { - ret := _m.Called(name, deviceURI, ppd, shared, errorPolicy, information, location) +// CreatePrinter provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) CreatePrinter(name string, deviceURI string, ppd string, shared bool, errorPolicy string, information string, location string) error { + ret := _mock.Called(name, deviceURI, ppd, shared, errorPolicy, information, location) if len(ret) == 0 { panic("no return value specified for CreatePrinter") } var r0 error - if rf, ok := ret.Get(0).(func(string, string, string, bool, string, string, string) error); ok { - r0 = rf(name, deviceURI, ppd, shared, errorPolicy, information, location) + if returnFunc, ok := ret.Get(0).(func(string, string, string, bool, string, string, string) error); ok { + r0 = returnFunc(name, deviceURI, ppd, shared, errorPolicy, information, location) } else { r0 = ret.Error(0) } - return r0 } @@ -240,42 +290,77 @@ type MockCUPSClientInterface_CreatePrinter_Call struct { // - errorPolicy string // - information string // - location string -func (_e *MockCUPSClientInterface_Expecter) CreatePrinter(name interface{}, deviceURI interface{}, ppd interface{}, shared interface{}, errorPolicy interface{}, information interface{}, location interface{}) *MockCUPSClientInterface_CreatePrinter_Call { +func (_e *MockCUPSClientInterface_Expecter) CreatePrinter(name any, deviceURI any, ppd any, shared any, errorPolicy any, information any, location any) *MockCUPSClientInterface_CreatePrinter_Call { return &MockCUPSClientInterface_CreatePrinter_Call{Call: _e.mock.On("CreatePrinter", name, deviceURI, ppd, shared, errorPolicy, information, location)} } func (_c *MockCUPSClientInterface_CreatePrinter_Call) Run(run func(name string, deviceURI string, ppd string, shared bool, errorPolicy string, information string, location string)) *MockCUPSClientInterface_CreatePrinter_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(string), args[3].(bool), args[4].(string), args[5].(string), args[6].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + var arg6 string + if args[6] != nil { + arg6 = args[6].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } -func (_c *MockCUPSClientInterface_CreatePrinter_Call) Return(_a0 error) *MockCUPSClientInterface_CreatePrinter_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_CreatePrinter_Call) Return(err error) *MockCUPSClientInterface_CreatePrinter_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_CreatePrinter_Call) RunAndReturn(run func(string, string, string, bool, string, string, string) error) *MockCUPSClientInterface_CreatePrinter_Call { +func (_c *MockCUPSClientInterface_CreatePrinter_Call) RunAndReturn(run func(name string, deviceURI string, ppd string, shared bool, errorPolicy string, information string, location string) error) *MockCUPSClientInterface_CreatePrinter_Call { _c.Call.Return(run) return _c } -// DeleteClass provides a mock function with given fields: class -func (_m *MockCUPSClientInterface) DeleteClass(class string) error { - ret := _m.Called(class) +// DeleteClass provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) DeleteClass(class string) error { + ret := _mock.Called(class) if len(ret) == 0 { panic("no return value specified for DeleteClass") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(class) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(class) } else { r0 = ret.Error(0) } - return r0 } @@ -286,42 +371,47 @@ type MockCUPSClientInterface_DeleteClass_Call struct { // DeleteClass is a helper method to define mock.On call // - class string -func (_e *MockCUPSClientInterface_Expecter) DeleteClass(class interface{}) *MockCUPSClientInterface_DeleteClass_Call { +func (_e *MockCUPSClientInterface_Expecter) DeleteClass(class any) *MockCUPSClientInterface_DeleteClass_Call { return &MockCUPSClientInterface_DeleteClass_Call{Call: _e.mock.On("DeleteClass", class)} } func (_c *MockCUPSClientInterface_DeleteClass_Call) Run(run func(class string)) *MockCUPSClientInterface_DeleteClass_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_DeleteClass_Call) Return(_a0 error) *MockCUPSClientInterface_DeleteClass_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_DeleteClass_Call) Return(err error) *MockCUPSClientInterface_DeleteClass_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_DeleteClass_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_DeleteClass_Call { +func (_c *MockCUPSClientInterface_DeleteClass_Call) RunAndReturn(run func(class string) error) *MockCUPSClientInterface_DeleteClass_Call { _c.Call.Return(run) return _c } -// DeletePrinter provides a mock function with given fields: printer -func (_m *MockCUPSClientInterface) DeletePrinter(printer string) error { - ret := _m.Called(printer) +// DeletePrinter provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) DeletePrinter(printer string) error { + ret := _mock.Called(printer) if len(ret) == 0 { panic("no return value specified for DeletePrinter") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(printer) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(printer) } else { r0 = ret.Error(0) } - return r0 } @@ -332,42 +422,47 @@ type MockCUPSClientInterface_DeletePrinter_Call struct { // DeletePrinter is a helper method to define mock.On call // - printer string -func (_e *MockCUPSClientInterface_Expecter) DeletePrinter(printer interface{}) *MockCUPSClientInterface_DeletePrinter_Call { +func (_e *MockCUPSClientInterface_Expecter) DeletePrinter(printer any) *MockCUPSClientInterface_DeletePrinter_Call { return &MockCUPSClientInterface_DeletePrinter_Call{Call: _e.mock.On("DeletePrinter", printer)} } func (_c *MockCUPSClientInterface_DeletePrinter_Call) Run(run func(printer string)) *MockCUPSClientInterface_DeletePrinter_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_DeletePrinter_Call) Return(_a0 error) *MockCUPSClientInterface_DeletePrinter_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_DeletePrinter_Call) Return(err error) *MockCUPSClientInterface_DeletePrinter_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_DeletePrinter_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_DeletePrinter_Call { +func (_c *MockCUPSClientInterface_DeletePrinter_Call) RunAndReturn(run func(printer string) error) *MockCUPSClientInterface_DeletePrinter_Call { _c.Call.Return(run) return _c } -// DeletePrinterFromClass provides a mock function with given fields: class, printer -func (_m *MockCUPSClientInterface) DeletePrinterFromClass(class string, printer string) error { - ret := _m.Called(class, printer) +// DeletePrinterFromClass provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) DeletePrinterFromClass(class string, printer string) error { + ret := _mock.Called(class, printer) if len(ret) == 0 { panic("no return value specified for DeletePrinterFromClass") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(class, printer) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(class, printer) } else { r0 = ret.Error(0) } - return r0 } @@ -379,30 +474,41 @@ type MockCUPSClientInterface_DeletePrinterFromClass_Call struct { // DeletePrinterFromClass is a helper method to define mock.On call // - class string // - printer string -func (_e *MockCUPSClientInterface_Expecter) DeletePrinterFromClass(class interface{}, printer interface{}) *MockCUPSClientInterface_DeletePrinterFromClass_Call { +func (_e *MockCUPSClientInterface_Expecter) DeletePrinterFromClass(class any, printer any) *MockCUPSClientInterface_DeletePrinterFromClass_Call { return &MockCUPSClientInterface_DeletePrinterFromClass_Call{Call: _e.mock.On("DeletePrinterFromClass", class, printer)} } func (_c *MockCUPSClientInterface_DeletePrinterFromClass_Call) Run(run func(class string, printer string)) *MockCUPSClientInterface_DeletePrinterFromClass_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_DeletePrinterFromClass_Call) Return(_a0 error) *MockCUPSClientInterface_DeletePrinterFromClass_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_DeletePrinterFromClass_Call) Return(err error) *MockCUPSClientInterface_DeletePrinterFromClass_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_DeletePrinterFromClass_Call) RunAndReturn(run func(string, string) error) *MockCUPSClientInterface_DeletePrinterFromClass_Call { +func (_c *MockCUPSClientInterface_DeletePrinterFromClass_Call) RunAndReturn(run func(class string, printer string) error) *MockCUPSClientInterface_DeletePrinterFromClass_Call { _c.Call.Return(run) return _c } -// GetClasses provides a mock function with given fields: attributes -func (_m *MockCUPSClientInterface) GetClasses(attributes []string) (map[string]ipp.Attributes, error) { - ret := _m.Called(attributes) +// GetClasses provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) GetClasses(attributes []string) (map[string]ipp.Attributes, error) { + ret := _mock.Called(attributes) if len(ret) == 0 { panic("no return value specified for GetClasses") @@ -410,23 +516,21 @@ func (_m *MockCUPSClientInterface) GetClasses(attributes []string) (map[string]i var r0 map[string]ipp.Attributes var r1 error - if rf, ok := ret.Get(0).(func([]string) (map[string]ipp.Attributes, error)); ok { - return rf(attributes) + if returnFunc, ok := ret.Get(0).(func([]string) (map[string]ipp.Attributes, error)); ok { + return returnFunc(attributes) } - if rf, ok := ret.Get(0).(func([]string) map[string]ipp.Attributes); ok { - r0 = rf(attributes) + if returnFunc, ok := ret.Get(0).(func([]string) map[string]ipp.Attributes); ok { + r0 = returnFunc(attributes) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]ipp.Attributes) } } - - if rf, ok := ret.Get(1).(func([]string) error); ok { - r1 = rf(attributes) + if returnFunc, ok := ret.Get(1).(func([]string) error); ok { + r1 = returnFunc(attributes) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -437,30 +541,36 @@ type MockCUPSClientInterface_GetClasses_Call struct { // GetClasses is a helper method to define mock.On call // - attributes []string -func (_e *MockCUPSClientInterface_Expecter) GetClasses(attributes interface{}) *MockCUPSClientInterface_GetClasses_Call { +func (_e *MockCUPSClientInterface_Expecter) GetClasses(attributes any) *MockCUPSClientInterface_GetClasses_Call { return &MockCUPSClientInterface_GetClasses_Call{Call: _e.mock.On("GetClasses", attributes)} } func (_c *MockCUPSClientInterface_GetClasses_Call) Run(run func(attributes []string)) *MockCUPSClientInterface_GetClasses_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]string)) + var arg0 []string + if args[0] != nil { + arg0 = args[0].([]string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_GetClasses_Call) Return(_a0 map[string]ipp.Attributes, _a1 error) *MockCUPSClientInterface_GetClasses_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_GetClasses_Call) Return(stringToAttributes map[string]ipp.Attributes, err error) *MockCUPSClientInterface_GetClasses_Call { + _c.Call.Return(stringToAttributes, err) return _c } -func (_c *MockCUPSClientInterface_GetClasses_Call) RunAndReturn(run func([]string) (map[string]ipp.Attributes, error)) *MockCUPSClientInterface_GetClasses_Call { +func (_c *MockCUPSClientInterface_GetClasses_Call) RunAndReturn(run func(attributes []string) (map[string]ipp.Attributes, error)) *MockCUPSClientInterface_GetClasses_Call { _c.Call.Return(run) return _c } -// GetDevices provides a mock function with no fields -func (_m *MockCUPSClientInterface) GetDevices() (map[string]ipp.Attributes, error) { - ret := _m.Called() +// GetDevices provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) GetDevices() (map[string]ipp.Attributes, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetDevices") @@ -468,23 +578,21 @@ func (_m *MockCUPSClientInterface) GetDevices() (map[string]ipp.Attributes, erro var r0 map[string]ipp.Attributes var r1 error - if rf, ok := ret.Get(0).(func() (map[string]ipp.Attributes, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (map[string]ipp.Attributes, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() map[string]ipp.Attributes); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() map[string]ipp.Attributes); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]ipp.Attributes) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -505,8 +613,8 @@ func (_c *MockCUPSClientInterface_GetDevices_Call) Run(run func()) *MockCUPSClie return _c } -func (_c *MockCUPSClientInterface_GetDevices_Call) Return(_a0 map[string]ipp.Attributes, _a1 error) *MockCUPSClientInterface_GetDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_GetDevices_Call) Return(stringToAttributes map[string]ipp.Attributes, err error) *MockCUPSClientInterface_GetDevices_Call { + _c.Call.Return(stringToAttributes, err) return _c } @@ -515,9 +623,9 @@ func (_c *MockCUPSClientInterface_GetDevices_Call) RunAndReturn(run func() (map[ return _c } -// GetJobs provides a mock function with given fields: printer, class, whichJobs, myJobs, firstJobId, limit, attributes -func (_m *MockCUPSClientInterface) GetJobs(printer string, class string, whichJobs string, myJobs bool, firstJobId int, limit int, attributes []string) (map[int]ipp.Attributes, error) { - ret := _m.Called(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) +// GetJobs provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) GetJobs(printer string, class string, whichJobs string, myJobs bool, firstJobId int, limit int, attributes []string) (map[int]ipp.Attributes, error) { + ret := _mock.Called(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) if len(ret) == 0 { panic("no return value specified for GetJobs") @@ -525,23 +633,21 @@ func (_m *MockCUPSClientInterface) GetJobs(printer string, class string, whichJo var r0 map[int]ipp.Attributes var r1 error - if rf, ok := ret.Get(0).(func(string, string, string, bool, int, int, []string) (map[int]ipp.Attributes, error)); ok { - return rf(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) + if returnFunc, ok := ret.Get(0).(func(string, string, string, bool, int, int, []string) (map[int]ipp.Attributes, error)); ok { + return returnFunc(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) } - if rf, ok := ret.Get(0).(func(string, string, string, bool, int, int, []string) map[int]ipp.Attributes); ok { - r0 = rf(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) + if returnFunc, ok := ret.Get(0).(func(string, string, string, bool, int, int, []string) map[int]ipp.Attributes); ok { + r0 = returnFunc(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[int]ipp.Attributes) } } - - if rf, ok := ret.Get(1).(func(string, string, string, bool, int, int, []string) error); ok { - r1 = rf(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) + if returnFunc, ok := ret.Get(1).(func(string, string, string, bool, int, int, []string) error); ok { + r1 = returnFunc(printer, class, whichJobs, myJobs, firstJobId, limit, attributes) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -558,30 +664,66 @@ type MockCUPSClientInterface_GetJobs_Call struct { // - firstJobId int // - limit int // - attributes []string -func (_e *MockCUPSClientInterface_Expecter) GetJobs(printer interface{}, class interface{}, whichJobs interface{}, myJobs interface{}, firstJobId interface{}, limit interface{}, attributes interface{}) *MockCUPSClientInterface_GetJobs_Call { +func (_e *MockCUPSClientInterface_Expecter) GetJobs(printer any, class any, whichJobs any, myJobs any, firstJobId any, limit any, attributes any) *MockCUPSClientInterface_GetJobs_Call { return &MockCUPSClientInterface_GetJobs_Call{Call: _e.mock.On("GetJobs", printer, class, whichJobs, myJobs, firstJobId, limit, attributes)} } func (_c *MockCUPSClientInterface_GetJobs_Call) Run(run func(printer string, class string, whichJobs string, myJobs bool, firstJobId int, limit int, attributes []string)) *MockCUPSClientInterface_GetJobs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(string), args[3].(bool), args[4].(int), args[5].(int), args[6].([]string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + var arg4 int + if args[4] != nil { + arg4 = args[4].(int) + } + var arg5 int + if args[5] != nil { + arg5 = args[5].(int) + } + var arg6 []string + if args[6] != nil { + arg6 = args[6].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } -func (_c *MockCUPSClientInterface_GetJobs_Call) Return(_a0 map[int]ipp.Attributes, _a1 error) *MockCUPSClientInterface_GetJobs_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_GetJobs_Call) Return(intToAttributes map[int]ipp.Attributes, err error) *MockCUPSClientInterface_GetJobs_Call { + _c.Call.Return(intToAttributes, err) return _c } -func (_c *MockCUPSClientInterface_GetJobs_Call) RunAndReturn(run func(string, string, string, bool, int, int, []string) (map[int]ipp.Attributes, error)) *MockCUPSClientInterface_GetJobs_Call { +func (_c *MockCUPSClientInterface_GetJobs_Call) RunAndReturn(run func(printer string, class string, whichJobs string, myJobs bool, firstJobId int, limit int, attributes []string) (map[int]ipp.Attributes, error)) *MockCUPSClientInterface_GetJobs_Call { _c.Call.Return(run) return _c } -// GetPPDs provides a mock function with no fields -func (_m *MockCUPSClientInterface) GetPPDs() (map[string]ipp.Attributes, error) { - ret := _m.Called() +// GetPPDs provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) GetPPDs() (map[string]ipp.Attributes, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPPDs") @@ -589,23 +731,21 @@ func (_m *MockCUPSClientInterface) GetPPDs() (map[string]ipp.Attributes, error) var r0 map[string]ipp.Attributes var r1 error - if rf, ok := ret.Get(0).(func() (map[string]ipp.Attributes, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (map[string]ipp.Attributes, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() map[string]ipp.Attributes); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() map[string]ipp.Attributes); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]ipp.Attributes) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -626,8 +766,8 @@ func (_c *MockCUPSClientInterface_GetPPDs_Call) Run(run func()) *MockCUPSClientI return _c } -func (_c *MockCUPSClientInterface_GetPPDs_Call) Return(_a0 map[string]ipp.Attributes, _a1 error) *MockCUPSClientInterface_GetPPDs_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_GetPPDs_Call) Return(stringToAttributes map[string]ipp.Attributes, err error) *MockCUPSClientInterface_GetPPDs_Call { + _c.Call.Return(stringToAttributes, err) return _c } @@ -636,9 +776,9 @@ func (_c *MockCUPSClientInterface_GetPPDs_Call) RunAndReturn(run func() (map[str return _c } -// GetPrinters provides a mock function with given fields: attributes -func (_m *MockCUPSClientInterface) GetPrinters(attributes []string) (map[string]ipp.Attributes, error) { - ret := _m.Called(attributes) +// GetPrinters provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) GetPrinters(attributes []string) (map[string]ipp.Attributes, error) { + ret := _mock.Called(attributes) if len(ret) == 0 { panic("no return value specified for GetPrinters") @@ -646,23 +786,21 @@ func (_m *MockCUPSClientInterface) GetPrinters(attributes []string) (map[string] var r0 map[string]ipp.Attributes var r1 error - if rf, ok := ret.Get(0).(func([]string) (map[string]ipp.Attributes, error)); ok { - return rf(attributes) + if returnFunc, ok := ret.Get(0).(func([]string) (map[string]ipp.Attributes, error)); ok { + return returnFunc(attributes) } - if rf, ok := ret.Get(0).(func([]string) map[string]ipp.Attributes); ok { - r0 = rf(attributes) + if returnFunc, ok := ret.Get(0).(func([]string) map[string]ipp.Attributes); ok { + r0 = returnFunc(attributes) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]ipp.Attributes) } } - - if rf, ok := ret.Get(1).(func([]string) error); ok { - r1 = rf(attributes) + if returnFunc, ok := ret.Get(1).(func([]string) error); ok { + r1 = returnFunc(attributes) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -673,42 +811,47 @@ type MockCUPSClientInterface_GetPrinters_Call struct { // GetPrinters is a helper method to define mock.On call // - attributes []string -func (_e *MockCUPSClientInterface_Expecter) GetPrinters(attributes interface{}) *MockCUPSClientInterface_GetPrinters_Call { +func (_e *MockCUPSClientInterface_Expecter) GetPrinters(attributes any) *MockCUPSClientInterface_GetPrinters_Call { return &MockCUPSClientInterface_GetPrinters_Call{Call: _e.mock.On("GetPrinters", attributes)} } func (_c *MockCUPSClientInterface_GetPrinters_Call) Run(run func(attributes []string)) *MockCUPSClientInterface_GetPrinters_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]string)) + var arg0 []string + if args[0] != nil { + arg0 = args[0].([]string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_GetPrinters_Call) Return(_a0 map[string]ipp.Attributes, _a1 error) *MockCUPSClientInterface_GetPrinters_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_GetPrinters_Call) Return(stringToAttributes map[string]ipp.Attributes, err error) *MockCUPSClientInterface_GetPrinters_Call { + _c.Call.Return(stringToAttributes, err) return _c } -func (_c *MockCUPSClientInterface_GetPrinters_Call) RunAndReturn(run func([]string) (map[string]ipp.Attributes, error)) *MockCUPSClientInterface_GetPrinters_Call { +func (_c *MockCUPSClientInterface_GetPrinters_Call) RunAndReturn(run func(attributes []string) (map[string]ipp.Attributes, error)) *MockCUPSClientInterface_GetPrinters_Call { _c.Call.Return(run) return _c } -// HoldJobUntil provides a mock function with given fields: jobID, holdUntil -func (_m *MockCUPSClientInterface) HoldJobUntil(jobID int, holdUntil string) error { - ret := _m.Called(jobID, holdUntil) +// HoldJobUntil provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) HoldJobUntil(jobID int, holdUntil string) error { + ret := _mock.Called(jobID, holdUntil) if len(ret) == 0 { panic("no return value specified for HoldJobUntil") } var r0 error - if rf, ok := ret.Get(0).(func(int, string) error); ok { - r0 = rf(jobID, holdUntil) + if returnFunc, ok := ret.Get(0).(func(int, string) error); ok { + r0 = returnFunc(jobID, holdUntil) } else { r0 = ret.Error(0) } - return r0 } @@ -720,42 +863,52 @@ type MockCUPSClientInterface_HoldJobUntil_Call struct { // HoldJobUntil is a helper method to define mock.On call // - jobID int // - holdUntil string -func (_e *MockCUPSClientInterface_Expecter) HoldJobUntil(jobID interface{}, holdUntil interface{}) *MockCUPSClientInterface_HoldJobUntil_Call { +func (_e *MockCUPSClientInterface_Expecter) HoldJobUntil(jobID any, holdUntil any) *MockCUPSClientInterface_HoldJobUntil_Call { return &MockCUPSClientInterface_HoldJobUntil_Call{Call: _e.mock.On("HoldJobUntil", jobID, holdUntil)} } func (_c *MockCUPSClientInterface_HoldJobUntil_Call) Run(run func(jobID int, holdUntil string)) *MockCUPSClientInterface_HoldJobUntil_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(string)) + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_HoldJobUntil_Call) Return(_a0 error) *MockCUPSClientInterface_HoldJobUntil_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_HoldJobUntil_Call) Return(err error) *MockCUPSClientInterface_HoldJobUntil_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_HoldJobUntil_Call) RunAndReturn(run func(int, string) error) *MockCUPSClientInterface_HoldJobUntil_Call { +func (_c *MockCUPSClientInterface_HoldJobUntil_Call) RunAndReturn(run func(jobID int, holdUntil string) error) *MockCUPSClientInterface_HoldJobUntil_Call { _c.Call.Return(run) return _c } -// MoveJob provides a mock function with given fields: jobID, destPrinter -func (_m *MockCUPSClientInterface) MoveJob(jobID int, destPrinter string) error { - ret := _m.Called(jobID, destPrinter) +// MoveJob provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) MoveJob(jobID int, destPrinter string) error { + ret := _mock.Called(jobID, destPrinter) if len(ret) == 0 { panic("no return value specified for MoveJob") } var r0 error - if rf, ok := ret.Get(0).(func(int, string) error); ok { - r0 = rf(jobID, destPrinter) + if returnFunc, ok := ret.Get(0).(func(int, string) error); ok { + r0 = returnFunc(jobID, destPrinter) } else { r0 = ret.Error(0) } - return r0 } @@ -767,42 +920,52 @@ type MockCUPSClientInterface_MoveJob_Call struct { // MoveJob is a helper method to define mock.On call // - jobID int // - destPrinter string -func (_e *MockCUPSClientInterface_Expecter) MoveJob(jobID interface{}, destPrinter interface{}) *MockCUPSClientInterface_MoveJob_Call { +func (_e *MockCUPSClientInterface_Expecter) MoveJob(jobID any, destPrinter any) *MockCUPSClientInterface_MoveJob_Call { return &MockCUPSClientInterface_MoveJob_Call{Call: _e.mock.On("MoveJob", jobID, destPrinter)} } func (_c *MockCUPSClientInterface_MoveJob_Call) Run(run func(jobID int, destPrinter string)) *MockCUPSClientInterface_MoveJob_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(string)) + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_MoveJob_Call) Return(_a0 error) *MockCUPSClientInterface_MoveJob_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_MoveJob_Call) Return(err error) *MockCUPSClientInterface_MoveJob_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_MoveJob_Call) RunAndReturn(run func(int, string) error) *MockCUPSClientInterface_MoveJob_Call { +func (_c *MockCUPSClientInterface_MoveJob_Call) RunAndReturn(run func(jobID int, destPrinter string) error) *MockCUPSClientInterface_MoveJob_Call { _c.Call.Return(run) return _c } -// PausePrinter provides a mock function with given fields: printer -func (_m *MockCUPSClientInterface) PausePrinter(printer string) error { - ret := _m.Called(printer) +// PausePrinter provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) PausePrinter(printer string) error { + ret := _mock.Called(printer) if len(ret) == 0 { panic("no return value specified for PausePrinter") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(printer) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(printer) } else { r0 = ret.Error(0) } - return r0 } @@ -813,30 +976,36 @@ type MockCUPSClientInterface_PausePrinter_Call struct { // PausePrinter is a helper method to define mock.On call // - printer string -func (_e *MockCUPSClientInterface_Expecter) PausePrinter(printer interface{}) *MockCUPSClientInterface_PausePrinter_Call { +func (_e *MockCUPSClientInterface_Expecter) PausePrinter(printer any) *MockCUPSClientInterface_PausePrinter_Call { return &MockCUPSClientInterface_PausePrinter_Call{Call: _e.mock.On("PausePrinter", printer)} } func (_c *MockCUPSClientInterface_PausePrinter_Call) Run(run func(printer string)) *MockCUPSClientInterface_PausePrinter_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_PausePrinter_Call) Return(_a0 error) *MockCUPSClientInterface_PausePrinter_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_PausePrinter_Call) Return(err error) *MockCUPSClientInterface_PausePrinter_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_PausePrinter_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_PausePrinter_Call { +func (_c *MockCUPSClientInterface_PausePrinter_Call) RunAndReturn(run func(printer string) error) *MockCUPSClientInterface_PausePrinter_Call { _c.Call.Return(run) return _c } -// PrintTestPage provides a mock function with given fields: printer, testPageData, size -func (_m *MockCUPSClientInterface) PrintTestPage(printer string, testPageData io.Reader, size int) (int, error) { - ret := _m.Called(printer, testPageData, size) +// PrintTestPage provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) PrintTestPage(printer string, testPageData io.Reader, size int) (int, error) { + ret := _mock.Called(printer, testPageData, size) if len(ret) == 0 { panic("no return value specified for PrintTestPage") @@ -844,21 +1013,19 @@ func (_m *MockCUPSClientInterface) PrintTestPage(printer string, testPageData io var r0 int var r1 error - if rf, ok := ret.Get(0).(func(string, io.Reader, int) (int, error)); ok { - return rf(printer, testPageData, size) + if returnFunc, ok := ret.Get(0).(func(string, io.Reader, int) (int, error)); ok { + return returnFunc(printer, testPageData, size) } - if rf, ok := ret.Get(0).(func(string, io.Reader, int) int); ok { - r0 = rf(printer, testPageData, size) + if returnFunc, ok := ret.Get(0).(func(string, io.Reader, int) int); ok { + r0 = returnFunc(printer, testPageData, size) } else { r0 = ret.Get(0).(int) } - - if rf, ok := ret.Get(1).(func(string, io.Reader, int) error); ok { - r1 = rf(printer, testPageData, size) + if returnFunc, ok := ret.Get(1).(func(string, io.Reader, int) error); ok { + r1 = returnFunc(printer, testPageData, size) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -871,42 +1038,57 @@ type MockCUPSClientInterface_PrintTestPage_Call struct { // - printer string // - testPageData io.Reader // - size int -func (_e *MockCUPSClientInterface_Expecter) PrintTestPage(printer interface{}, testPageData interface{}, size interface{}) *MockCUPSClientInterface_PrintTestPage_Call { +func (_e *MockCUPSClientInterface_Expecter) PrintTestPage(printer any, testPageData any, size any) *MockCUPSClientInterface_PrintTestPage_Call { return &MockCUPSClientInterface_PrintTestPage_Call{Call: _e.mock.On("PrintTestPage", printer, testPageData, size)} } func (_c *MockCUPSClientInterface_PrintTestPage_Call) Run(run func(printer string, testPageData io.Reader, size int)) *MockCUPSClientInterface_PrintTestPage_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(io.Reader), args[2].(int)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 io.Reader + if args[1] != nil { + arg1 = args[1].(io.Reader) + } + var arg2 int + if args[2] != nil { + arg2 = args[2].(int) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockCUPSClientInterface_PrintTestPage_Call) Return(_a0 int, _a1 error) *MockCUPSClientInterface_PrintTestPage_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_PrintTestPage_Call) Return(n int, err error) *MockCUPSClientInterface_PrintTestPage_Call { + _c.Call.Return(n, err) return _c } -func (_c *MockCUPSClientInterface_PrintTestPage_Call) RunAndReturn(run func(string, io.Reader, int) (int, error)) *MockCUPSClientInterface_PrintTestPage_Call { +func (_c *MockCUPSClientInterface_PrintTestPage_Call) RunAndReturn(run func(printer string, testPageData io.Reader, size int) (int, error)) *MockCUPSClientInterface_PrintTestPage_Call { _c.Call.Return(run) return _c } -// RejectJobs provides a mock function with given fields: printer -func (_m *MockCUPSClientInterface) RejectJobs(printer string) error { - ret := _m.Called(printer) +// RejectJobs provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) RejectJobs(printer string) error { + ret := _mock.Called(printer) if len(ret) == 0 { panic("no return value specified for RejectJobs") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(printer) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(printer) } else { r0 = ret.Error(0) } - return r0 } @@ -917,42 +1099,47 @@ type MockCUPSClientInterface_RejectJobs_Call struct { // RejectJobs is a helper method to define mock.On call // - printer string -func (_e *MockCUPSClientInterface_Expecter) RejectJobs(printer interface{}) *MockCUPSClientInterface_RejectJobs_Call { +func (_e *MockCUPSClientInterface_Expecter) RejectJobs(printer any) *MockCUPSClientInterface_RejectJobs_Call { return &MockCUPSClientInterface_RejectJobs_Call{Call: _e.mock.On("RejectJobs", printer)} } func (_c *MockCUPSClientInterface_RejectJobs_Call) Run(run func(printer string)) *MockCUPSClientInterface_RejectJobs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_RejectJobs_Call) Return(_a0 error) *MockCUPSClientInterface_RejectJobs_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_RejectJobs_Call) Return(err error) *MockCUPSClientInterface_RejectJobs_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_RejectJobs_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_RejectJobs_Call { +func (_c *MockCUPSClientInterface_RejectJobs_Call) RunAndReturn(run func(printer string) error) *MockCUPSClientInterface_RejectJobs_Call { _c.Call.Return(run) return _c } -// RestartJob provides a mock function with given fields: jobID -func (_m *MockCUPSClientInterface) RestartJob(jobID int) error { - ret := _m.Called(jobID) +// RestartJob provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) RestartJob(jobID int) error { + ret := _mock.Called(jobID) if len(ret) == 0 { panic("no return value specified for RestartJob") } var r0 error - if rf, ok := ret.Get(0).(func(int) error); ok { - r0 = rf(jobID) + if returnFunc, ok := ret.Get(0).(func(int) error); ok { + r0 = returnFunc(jobID) } else { r0 = ret.Error(0) } - return r0 } @@ -963,42 +1150,47 @@ type MockCUPSClientInterface_RestartJob_Call struct { // RestartJob is a helper method to define mock.On call // - jobID int -func (_e *MockCUPSClientInterface_Expecter) RestartJob(jobID interface{}) *MockCUPSClientInterface_RestartJob_Call { +func (_e *MockCUPSClientInterface_Expecter) RestartJob(jobID any) *MockCUPSClientInterface_RestartJob_Call { return &MockCUPSClientInterface_RestartJob_Call{Call: _e.mock.On("RestartJob", jobID)} } func (_c *MockCUPSClientInterface_RestartJob_Call) Run(run func(jobID int)) *MockCUPSClientInterface_RestartJob_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_RestartJob_Call) Return(_a0 error) *MockCUPSClientInterface_RestartJob_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_RestartJob_Call) Return(err error) *MockCUPSClientInterface_RestartJob_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_RestartJob_Call) RunAndReturn(run func(int) error) *MockCUPSClientInterface_RestartJob_Call { +func (_c *MockCUPSClientInterface_RestartJob_Call) RunAndReturn(run func(jobID int) error) *MockCUPSClientInterface_RestartJob_Call { _c.Call.Return(run) return _c } -// ResumePrinter provides a mock function with given fields: printer -func (_m *MockCUPSClientInterface) ResumePrinter(printer string) error { - ret := _m.Called(printer) +// ResumePrinter provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) ResumePrinter(printer string) error { + ret := _mock.Called(printer) if len(ret) == 0 { panic("no return value specified for ResumePrinter") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(printer) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(printer) } else { r0 = ret.Error(0) } - return r0 } @@ -1009,30 +1201,36 @@ type MockCUPSClientInterface_ResumePrinter_Call struct { // ResumePrinter is a helper method to define mock.On call // - printer string -func (_e *MockCUPSClientInterface_Expecter) ResumePrinter(printer interface{}) *MockCUPSClientInterface_ResumePrinter_Call { +func (_e *MockCUPSClientInterface_Expecter) ResumePrinter(printer any) *MockCUPSClientInterface_ResumePrinter_Call { return &MockCUPSClientInterface_ResumePrinter_Call{Call: _e.mock.On("ResumePrinter", printer)} } func (_c *MockCUPSClientInterface_ResumePrinter_Call) Run(run func(printer string)) *MockCUPSClientInterface_ResumePrinter_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockCUPSClientInterface_ResumePrinter_Call) Return(_a0 error) *MockCUPSClientInterface_ResumePrinter_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_ResumePrinter_Call) Return(err error) *MockCUPSClientInterface_ResumePrinter_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_ResumePrinter_Call) RunAndReturn(run func(string) error) *MockCUPSClientInterface_ResumePrinter_Call { +func (_c *MockCUPSClientInterface_ResumePrinter_Call) RunAndReturn(run func(printer string) error) *MockCUPSClientInterface_ResumePrinter_Call { _c.Call.Return(run) return _c } -// SendRequest provides a mock function with given fields: url, req, additionalResponseData -func (_m *MockCUPSClientInterface) SendRequest(url string, req *ipp.Request, additionalResponseData io.Writer) (*ipp.Response, error) { - ret := _m.Called(url, req, additionalResponseData) +// SendRequest provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) SendRequest(url string, req *ipp.Request, additionalResponseData io.Writer) (*ipp.Response, error) { + ret := _mock.Called(url, req, additionalResponseData) if len(ret) == 0 { panic("no return value specified for SendRequest") @@ -1040,23 +1238,21 @@ func (_m *MockCUPSClientInterface) SendRequest(url string, req *ipp.Request, add var r0 *ipp.Response var r1 error - if rf, ok := ret.Get(0).(func(string, *ipp.Request, io.Writer) (*ipp.Response, error)); ok { - return rf(url, req, additionalResponseData) + if returnFunc, ok := ret.Get(0).(func(string, *ipp.Request, io.Writer) (*ipp.Response, error)); ok { + return returnFunc(url, req, additionalResponseData) } - if rf, ok := ret.Get(0).(func(string, *ipp.Request, io.Writer) *ipp.Response); ok { - r0 = rf(url, req, additionalResponseData) + if returnFunc, ok := ret.Get(0).(func(string, *ipp.Request, io.Writer) *ipp.Response); ok { + r0 = returnFunc(url, req, additionalResponseData) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ipp.Response) } } - - if rf, ok := ret.Get(1).(func(string, *ipp.Request, io.Writer) error); ok { - r1 = rf(url, req, additionalResponseData) + if returnFunc, ok := ret.Get(1).(func(string, *ipp.Request, io.Writer) error); ok { + r1 = returnFunc(url, req, additionalResponseData) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1069,42 +1265,57 @@ type MockCUPSClientInterface_SendRequest_Call struct { // - url string // - req *ipp.Request // - additionalResponseData io.Writer -func (_e *MockCUPSClientInterface_Expecter) SendRequest(url interface{}, req interface{}, additionalResponseData interface{}) *MockCUPSClientInterface_SendRequest_Call { +func (_e *MockCUPSClientInterface_Expecter) SendRequest(url any, req any, additionalResponseData any) *MockCUPSClientInterface_SendRequest_Call { return &MockCUPSClientInterface_SendRequest_Call{Call: _e.mock.On("SendRequest", url, req, additionalResponseData)} } func (_c *MockCUPSClientInterface_SendRequest_Call) Run(run func(url string, req *ipp.Request, additionalResponseData io.Writer)) *MockCUPSClientInterface_SendRequest_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(*ipp.Request), args[2].(io.Writer)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 *ipp.Request + if args[1] != nil { + arg1 = args[1].(*ipp.Request) + } + var arg2 io.Writer + if args[2] != nil { + arg2 = args[2].(io.Writer) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockCUPSClientInterface_SendRequest_Call) Return(_a0 *ipp.Response, _a1 error) *MockCUPSClientInterface_SendRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockCUPSClientInterface_SendRequest_Call) Return(response *ipp.Response, err error) *MockCUPSClientInterface_SendRequest_Call { + _c.Call.Return(response, err) return _c } -func (_c *MockCUPSClientInterface_SendRequest_Call) RunAndReturn(run func(string, *ipp.Request, io.Writer) (*ipp.Response, error)) *MockCUPSClientInterface_SendRequest_Call { +func (_c *MockCUPSClientInterface_SendRequest_Call) RunAndReturn(run func(url string, req *ipp.Request, additionalResponseData io.Writer) (*ipp.Response, error)) *MockCUPSClientInterface_SendRequest_Call { _c.Call.Return(run) return _c } -// SetPrinterInformation provides a mock function with given fields: printer, information -func (_m *MockCUPSClientInterface) SetPrinterInformation(printer string, information string) error { - ret := _m.Called(printer, information) +// SetPrinterInformation provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) SetPrinterInformation(printer string, information string) error { + ret := _mock.Called(printer, information) if len(ret) == 0 { panic("no return value specified for SetPrinterInformation") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(printer, information) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(printer, information) } else { r0 = ret.Error(0) } - return r0 } @@ -1116,42 +1327,52 @@ type MockCUPSClientInterface_SetPrinterInformation_Call struct { // SetPrinterInformation is a helper method to define mock.On call // - printer string // - information string -func (_e *MockCUPSClientInterface_Expecter) SetPrinterInformation(printer interface{}, information interface{}) *MockCUPSClientInterface_SetPrinterInformation_Call { +func (_e *MockCUPSClientInterface_Expecter) SetPrinterInformation(printer any, information any) *MockCUPSClientInterface_SetPrinterInformation_Call { return &MockCUPSClientInterface_SetPrinterInformation_Call{Call: _e.mock.On("SetPrinterInformation", printer, information)} } func (_c *MockCUPSClientInterface_SetPrinterInformation_Call) Run(run func(printer string, information string)) *MockCUPSClientInterface_SetPrinterInformation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_SetPrinterInformation_Call) Return(_a0 error) *MockCUPSClientInterface_SetPrinterInformation_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_SetPrinterInformation_Call) Return(err error) *MockCUPSClientInterface_SetPrinterInformation_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_SetPrinterInformation_Call) RunAndReturn(run func(string, string) error) *MockCUPSClientInterface_SetPrinterInformation_Call { +func (_c *MockCUPSClientInterface_SetPrinterInformation_Call) RunAndReturn(run func(printer string, information string) error) *MockCUPSClientInterface_SetPrinterInformation_Call { _c.Call.Return(run) return _c } -// SetPrinterIsShared provides a mock function with given fields: printer, shared -func (_m *MockCUPSClientInterface) SetPrinterIsShared(printer string, shared bool) error { - ret := _m.Called(printer, shared) +// SetPrinterIsShared provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) SetPrinterIsShared(printer string, shared bool) error { + ret := _mock.Called(printer, shared) if len(ret) == 0 { panic("no return value specified for SetPrinterIsShared") } var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(printer, shared) + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(printer, shared) } else { r0 = ret.Error(0) } - return r0 } @@ -1163,42 +1384,52 @@ type MockCUPSClientInterface_SetPrinterIsShared_Call struct { // SetPrinterIsShared is a helper method to define mock.On call // - printer string // - shared bool -func (_e *MockCUPSClientInterface_Expecter) SetPrinterIsShared(printer interface{}, shared interface{}) *MockCUPSClientInterface_SetPrinterIsShared_Call { +func (_e *MockCUPSClientInterface_Expecter) SetPrinterIsShared(printer any, shared any) *MockCUPSClientInterface_SetPrinterIsShared_Call { return &MockCUPSClientInterface_SetPrinterIsShared_Call{Call: _e.mock.On("SetPrinterIsShared", printer, shared)} } func (_c *MockCUPSClientInterface_SetPrinterIsShared_Call) Run(run func(printer string, shared bool)) *MockCUPSClientInterface_SetPrinterIsShared_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_SetPrinterIsShared_Call) Return(_a0 error) *MockCUPSClientInterface_SetPrinterIsShared_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_SetPrinterIsShared_Call) Return(err error) *MockCUPSClientInterface_SetPrinterIsShared_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_SetPrinterIsShared_Call) RunAndReturn(run func(string, bool) error) *MockCUPSClientInterface_SetPrinterIsShared_Call { +func (_c *MockCUPSClientInterface_SetPrinterIsShared_Call) RunAndReturn(run func(printer string, shared bool) error) *MockCUPSClientInterface_SetPrinterIsShared_Call { _c.Call.Return(run) return _c } -// SetPrinterLocation provides a mock function with given fields: printer, location -func (_m *MockCUPSClientInterface) SetPrinterLocation(printer string, location string) error { - ret := _m.Called(printer, location) +// SetPrinterLocation provides a mock function for the type MockCUPSClientInterface +func (_mock *MockCUPSClientInterface) SetPrinterLocation(printer string, location string) error { + ret := _mock.Called(printer, location) if len(ret) == 0 { panic("no return value specified for SetPrinterLocation") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(printer, location) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(printer, location) } else { r0 = ret.Error(0) } - return r0 } @@ -1210,37 +1441,34 @@ type MockCUPSClientInterface_SetPrinterLocation_Call struct { // SetPrinterLocation is a helper method to define mock.On call // - printer string // - location string -func (_e *MockCUPSClientInterface_Expecter) SetPrinterLocation(printer interface{}, location interface{}) *MockCUPSClientInterface_SetPrinterLocation_Call { +func (_e *MockCUPSClientInterface_Expecter) SetPrinterLocation(printer any, location any) *MockCUPSClientInterface_SetPrinterLocation_Call { return &MockCUPSClientInterface_SetPrinterLocation_Call{Call: _e.mock.On("SetPrinterLocation", printer, location)} } func (_c *MockCUPSClientInterface_SetPrinterLocation_Call) Run(run func(printer string, location string)) *MockCUPSClientInterface_SetPrinterLocation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockCUPSClientInterface_SetPrinterLocation_Call) Return(_a0 error) *MockCUPSClientInterface_SetPrinterLocation_Call { - _c.Call.Return(_a0) +func (_c *MockCUPSClientInterface_SetPrinterLocation_Call) Return(err error) *MockCUPSClientInterface_SetPrinterLocation_Call { + _c.Call.Return(err) return _c } -func (_c *MockCUPSClientInterface_SetPrinterLocation_Call) RunAndReturn(run func(string, string) error) *MockCUPSClientInterface_SetPrinterLocation_Call { +func (_c *MockCUPSClientInterface_SetPrinterLocation_Call) RunAndReturn(run func(printer string, location string) error) *MockCUPSClientInterface_SetPrinterLocation_Call { _c.Call.Return(run) return _c } - -// NewMockCUPSClientInterface creates a new instance of MockCUPSClientInterface. 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 NewMockCUPSClientInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCUPSClientInterface { - mock := &MockCUPSClientInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/cups_pkhelper/mock_PkHelper.go b/core/internal/mocks/cups_pkhelper/mock_PkHelper.go index cad5bfcd..54d28122 100644 --- a/core/internal/mocks/cups_pkhelper/mock_PkHelper.go +++ b/core/internal/mocks/cups_pkhelper/mock_PkHelper.go @@ -1,698 +1,14 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_cups_pkhelper import ( - cups "github.com/AvengeMedia/DankMaterialShell/core/internal/server/cups" + "github.com/AvengeMedia/DankMaterialShell/core/internal/server/cups" mock "github.com/stretchr/testify/mock" ) -// MockPkHelper is an autogenerated mock type for the PkHelper type -type MockPkHelper struct { - mock.Mock -} - -type MockPkHelper_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPkHelper) EXPECT() *MockPkHelper_Expecter { - return &MockPkHelper_Expecter{mock: &_m.Mock} -} - -// ClassAddPrinter provides a mock function with given fields: className, printerName -func (_m *MockPkHelper) ClassAddPrinter(className string, printerName string) error { - ret := _m.Called(className, printerName) - - if len(ret) == 0 { - panic("no return value specified for ClassAddPrinter") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(className, printerName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_ClassAddPrinter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassAddPrinter' -type MockPkHelper_ClassAddPrinter_Call struct { - *mock.Call -} - -// ClassAddPrinter is a helper method to define mock.On call -// - className string -// - printerName string -func (_e *MockPkHelper_Expecter) ClassAddPrinter(className interface{}, printerName interface{}) *MockPkHelper_ClassAddPrinter_Call { - return &MockPkHelper_ClassAddPrinter_Call{Call: _e.mock.On("ClassAddPrinter", className, printerName)} -} - -func (_c *MockPkHelper_ClassAddPrinter_Call) Run(run func(className string, printerName string)) *MockPkHelper_ClassAddPrinter_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockPkHelper_ClassAddPrinter_Call) Return(_a0 error) *MockPkHelper_ClassAddPrinter_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_ClassAddPrinter_Call) RunAndReturn(run func(string, string) error) *MockPkHelper_ClassAddPrinter_Call { - _c.Call.Return(run) - return _c -} - -// ClassDelete provides a mock function with given fields: className -func (_m *MockPkHelper) ClassDelete(className string) error { - ret := _m.Called(className) - - if len(ret) == 0 { - panic("no return value specified for ClassDelete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(className) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_ClassDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassDelete' -type MockPkHelper_ClassDelete_Call struct { - *mock.Call -} - -// ClassDelete is a helper method to define mock.On call -// - className string -func (_e *MockPkHelper_Expecter) ClassDelete(className interface{}) *MockPkHelper_ClassDelete_Call { - return &MockPkHelper_ClassDelete_Call{Call: _e.mock.On("ClassDelete", className)} -} - -func (_c *MockPkHelper_ClassDelete_Call) Run(run func(className string)) *MockPkHelper_ClassDelete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockPkHelper_ClassDelete_Call) Return(_a0 error) *MockPkHelper_ClassDelete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_ClassDelete_Call) RunAndReturn(run func(string) error) *MockPkHelper_ClassDelete_Call { - _c.Call.Return(run) - return _c -} - -// ClassDeletePrinter provides a mock function with given fields: className, printerName -func (_m *MockPkHelper) ClassDeletePrinter(className string, printerName string) error { - ret := _m.Called(className, printerName) - - if len(ret) == 0 { - panic("no return value specified for ClassDeletePrinter") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(className, printerName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_ClassDeletePrinter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassDeletePrinter' -type MockPkHelper_ClassDeletePrinter_Call struct { - *mock.Call -} - -// ClassDeletePrinter is a helper method to define mock.On call -// - className string -// - printerName string -func (_e *MockPkHelper_Expecter) ClassDeletePrinter(className interface{}, printerName interface{}) *MockPkHelper_ClassDeletePrinter_Call { - return &MockPkHelper_ClassDeletePrinter_Call{Call: _e.mock.On("ClassDeletePrinter", className, printerName)} -} - -func (_c *MockPkHelper_ClassDeletePrinter_Call) Run(run func(className string, printerName string)) *MockPkHelper_ClassDeletePrinter_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockPkHelper_ClassDeletePrinter_Call) Return(_a0 error) *MockPkHelper_ClassDeletePrinter_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_ClassDeletePrinter_Call) RunAndReturn(run func(string, string) error) *MockPkHelper_ClassDeletePrinter_Call { - _c.Call.Return(run) - return _c -} - -// DevicesGet provides a mock function with given fields: timeout, limit, includeSchemes, excludeSchemes -func (_m *MockPkHelper) DevicesGet(timeout int, limit int, includeSchemes []string, excludeSchemes []string) ([]cups.Device, error) { - ret := _m.Called(timeout, limit, includeSchemes, excludeSchemes) - - if len(ret) == 0 { - panic("no return value specified for DevicesGet") - } - - var r0 []cups.Device - var r1 error - if rf, ok := ret.Get(0).(func(int, int, []string, []string) ([]cups.Device, error)); ok { - return rf(timeout, limit, includeSchemes, excludeSchemes) - } - if rf, ok := ret.Get(0).(func(int, int, []string, []string) []cups.Device); ok { - r0 = rf(timeout, limit, includeSchemes, excludeSchemes) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]cups.Device) - } - } - - if rf, ok := ret.Get(1).(func(int, int, []string, []string) error); ok { - r1 = rf(timeout, limit, includeSchemes, excludeSchemes) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPkHelper_DevicesGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DevicesGet' -type MockPkHelper_DevicesGet_Call struct { - *mock.Call -} - -// DevicesGet is a helper method to define mock.On call -// - timeout int -// - limit int -// - includeSchemes []string -// - excludeSchemes []string -func (_e *MockPkHelper_Expecter) DevicesGet(timeout interface{}, limit interface{}, includeSchemes interface{}, excludeSchemes interface{}) *MockPkHelper_DevicesGet_Call { - return &MockPkHelper_DevicesGet_Call{Call: _e.mock.On("DevicesGet", timeout, limit, includeSchemes, excludeSchemes)} -} - -func (_c *MockPkHelper_DevicesGet_Call) Run(run func(timeout int, limit int, includeSchemes []string, excludeSchemes []string)) *MockPkHelper_DevicesGet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(int), args[2].([]string), args[3].([]string)) - }) - return _c -} - -func (_c *MockPkHelper_DevicesGet_Call) Return(_a0 []cups.Device, _a1 error) *MockPkHelper_DevicesGet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPkHelper_DevicesGet_Call) RunAndReturn(run func(int, int, []string, []string) ([]cups.Device, error)) *MockPkHelper_DevicesGet_Call { - _c.Call.Return(run) - return _c -} - -// JobCancelPurge provides a mock function with given fields: jobID, purge -func (_m *MockPkHelper) JobCancelPurge(jobID int, purge bool) error { - ret := _m.Called(jobID, purge) - - if len(ret) == 0 { - panic("no return value specified for JobCancelPurge") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int, bool) error); ok { - r0 = rf(jobID, purge) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_JobCancelPurge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobCancelPurge' -type MockPkHelper_JobCancelPurge_Call struct { - *mock.Call -} - -// JobCancelPurge is a helper method to define mock.On call -// - jobID int -// - purge bool -func (_e *MockPkHelper_Expecter) JobCancelPurge(jobID interface{}, purge interface{}) *MockPkHelper_JobCancelPurge_Call { - return &MockPkHelper_JobCancelPurge_Call{Call: _e.mock.On("JobCancelPurge", jobID, purge)} -} - -func (_c *MockPkHelper_JobCancelPurge_Call) Run(run func(jobID int, purge bool)) *MockPkHelper_JobCancelPurge_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(bool)) - }) - return _c -} - -func (_c *MockPkHelper_JobCancelPurge_Call) Return(_a0 error) *MockPkHelper_JobCancelPurge_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_JobCancelPurge_Call) RunAndReturn(run func(int, bool) error) *MockPkHelper_JobCancelPurge_Call { - _c.Call.Return(run) - return _c -} - -// JobRestart provides a mock function with given fields: jobID -func (_m *MockPkHelper) JobRestart(jobID int) error { - ret := _m.Called(jobID) - - if len(ret) == 0 { - panic("no return value specified for JobRestart") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int) error); ok { - r0 = rf(jobID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_JobRestart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobRestart' -type MockPkHelper_JobRestart_Call struct { - *mock.Call -} - -// JobRestart is a helper method to define mock.On call -// - jobID int -func (_e *MockPkHelper_Expecter) JobRestart(jobID interface{}) *MockPkHelper_JobRestart_Call { - return &MockPkHelper_JobRestart_Call{Call: _e.mock.On("JobRestart", jobID)} -} - -func (_c *MockPkHelper_JobRestart_Call) Run(run func(jobID int)) *MockPkHelper_JobRestart_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockPkHelper_JobRestart_Call) Return(_a0 error) *MockPkHelper_JobRestart_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_JobRestart_Call) RunAndReturn(run func(int) error) *MockPkHelper_JobRestart_Call { - _c.Call.Return(run) - return _c -} - -// JobSetHoldUntil provides a mock function with given fields: jobID, holdUntil -func (_m *MockPkHelper) JobSetHoldUntil(jobID int, holdUntil string) error { - ret := _m.Called(jobID, holdUntil) - - if len(ret) == 0 { - panic("no return value specified for JobSetHoldUntil") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int, string) error); ok { - r0 = rf(jobID, holdUntil) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_JobSetHoldUntil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobSetHoldUntil' -type MockPkHelper_JobSetHoldUntil_Call struct { - *mock.Call -} - -// JobSetHoldUntil is a helper method to define mock.On call -// - jobID int -// - holdUntil string -func (_e *MockPkHelper_Expecter) JobSetHoldUntil(jobID interface{}, holdUntil interface{}) *MockPkHelper_JobSetHoldUntil_Call { - return &MockPkHelper_JobSetHoldUntil_Call{Call: _e.mock.On("JobSetHoldUntil", jobID, holdUntil)} -} - -func (_c *MockPkHelper_JobSetHoldUntil_Call) Run(run func(jobID int, holdUntil string)) *MockPkHelper_JobSetHoldUntil_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(string)) - }) - return _c -} - -func (_c *MockPkHelper_JobSetHoldUntil_Call) Return(_a0 error) *MockPkHelper_JobSetHoldUntil_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_JobSetHoldUntil_Call) RunAndReturn(run func(int, string) error) *MockPkHelper_JobSetHoldUntil_Call { - _c.Call.Return(run) - return _c -} - -// PrinterAdd provides a mock function with given fields: name, uri, ppd, info, location -func (_m *MockPkHelper) PrinterAdd(name string, uri string, ppd string, info string, location string) error { - ret := _m.Called(name, uri, ppd, info, location) - - if len(ret) == 0 { - panic("no return value specified for PrinterAdd") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { - r0 = rf(name, uri, ppd, info, location) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterAdd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterAdd' -type MockPkHelper_PrinterAdd_Call struct { - *mock.Call -} - -// PrinterAdd is a helper method to define mock.On call -// - name string -// - uri string -// - ppd string -// - info string -// - location string -func (_e *MockPkHelper_Expecter) PrinterAdd(name interface{}, uri interface{}, ppd interface{}, info interface{}, location interface{}) *MockPkHelper_PrinterAdd_Call { - return &MockPkHelper_PrinterAdd_Call{Call: _e.mock.On("PrinterAdd", name, uri, ppd, info, location)} -} - -func (_c *MockPkHelper_PrinterAdd_Call) Run(run func(name string, uri string, ppd string, info string, location string)) *MockPkHelper_PrinterAdd_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterAdd_Call) Return(_a0 error) *MockPkHelper_PrinterAdd_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterAdd_Call) RunAndReturn(run func(string, string, string, string, string) error) *MockPkHelper_PrinterAdd_Call { - _c.Call.Return(run) - return _c -} - -// PrinterDelete provides a mock function with given fields: name -func (_m *MockPkHelper) PrinterDelete(name string) error { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for PrinterDelete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterDelete' -type MockPkHelper_PrinterDelete_Call struct { - *mock.Call -} - -// PrinterDelete is a helper method to define mock.On call -// - name string -func (_e *MockPkHelper_Expecter) PrinterDelete(name interface{}) *MockPkHelper_PrinterDelete_Call { - return &MockPkHelper_PrinterDelete_Call{Call: _e.mock.On("PrinterDelete", name)} -} - -func (_c *MockPkHelper_PrinterDelete_Call) Run(run func(name string)) *MockPkHelper_PrinterDelete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterDelete_Call) Return(_a0 error) *MockPkHelper_PrinterDelete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterDelete_Call) RunAndReturn(run func(string) error) *MockPkHelper_PrinterDelete_Call { - _c.Call.Return(run) - return _c -} - -// PrinterSetAcceptJobs provides a mock function with given fields: name, enabled, reason -func (_m *MockPkHelper) PrinterSetAcceptJobs(name string, enabled bool, reason string) error { - ret := _m.Called(name, enabled, reason) - - if len(ret) == 0 { - panic("no return value specified for PrinterSetAcceptJobs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, bool, string) error); ok { - r0 = rf(name, enabled, reason) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterSetAcceptJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetAcceptJobs' -type MockPkHelper_PrinterSetAcceptJobs_Call struct { - *mock.Call -} - -// PrinterSetAcceptJobs is a helper method to define mock.On call -// - name string -// - enabled bool -// - reason string -func (_e *MockPkHelper_Expecter) PrinterSetAcceptJobs(name interface{}, enabled interface{}, reason interface{}) *MockPkHelper_PrinterSetAcceptJobs_Call { - return &MockPkHelper_PrinterSetAcceptJobs_Call{Call: _e.mock.On("PrinterSetAcceptJobs", name, enabled, reason)} -} - -func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) Run(run func(name string, enabled bool, reason string)) *MockPkHelper_PrinterSetAcceptJobs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool), args[2].(string)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) Return(_a0 error) *MockPkHelper_PrinterSetAcceptJobs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) RunAndReturn(run func(string, bool, string) error) *MockPkHelper_PrinterSetAcceptJobs_Call { - _c.Call.Return(run) - return _c -} - -// PrinterSetEnabled provides a mock function with given fields: name, enabled -func (_m *MockPkHelper) PrinterSetEnabled(name string, enabled bool) error { - ret := _m.Called(name, enabled) - - if len(ret) == 0 { - panic("no return value specified for PrinterSetEnabled") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(name, enabled) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterSetEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetEnabled' -type MockPkHelper_PrinterSetEnabled_Call struct { - *mock.Call -} - -// PrinterSetEnabled is a helper method to define mock.On call -// - name string -// - enabled bool -func (_e *MockPkHelper_Expecter) PrinterSetEnabled(name interface{}, enabled interface{}) *MockPkHelper_PrinterSetEnabled_Call { - return &MockPkHelper_PrinterSetEnabled_Call{Call: _e.mock.On("PrinterSetEnabled", name, enabled)} -} - -func (_c *MockPkHelper_PrinterSetEnabled_Call) Run(run func(name string, enabled bool)) *MockPkHelper_PrinterSetEnabled_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterSetEnabled_Call) Return(_a0 error) *MockPkHelper_PrinterSetEnabled_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterSetEnabled_Call) RunAndReturn(run func(string, bool) error) *MockPkHelper_PrinterSetEnabled_Call { - _c.Call.Return(run) - return _c -} - -// PrinterSetInfo provides a mock function with given fields: name, info -func (_m *MockPkHelper) PrinterSetInfo(name string, info string) error { - ret := _m.Called(name, info) - - if len(ret) == 0 { - panic("no return value specified for PrinterSetInfo") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(name, info) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterSetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetInfo' -type MockPkHelper_PrinterSetInfo_Call struct { - *mock.Call -} - -// PrinterSetInfo is a helper method to define mock.On call -// - name string -// - info string -func (_e *MockPkHelper_Expecter) PrinterSetInfo(name interface{}, info interface{}) *MockPkHelper_PrinterSetInfo_Call { - return &MockPkHelper_PrinterSetInfo_Call{Call: _e.mock.On("PrinterSetInfo", name, info)} -} - -func (_c *MockPkHelper_PrinterSetInfo_Call) Run(run func(name string, info string)) *MockPkHelper_PrinterSetInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterSetInfo_Call) Return(_a0 error) *MockPkHelper_PrinterSetInfo_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterSetInfo_Call) RunAndReturn(run func(string, string) error) *MockPkHelper_PrinterSetInfo_Call { - _c.Call.Return(run) - return _c -} - -// PrinterSetLocation provides a mock function with given fields: name, location -func (_m *MockPkHelper) PrinterSetLocation(name string, location string) error { - ret := _m.Called(name, location) - - if len(ret) == 0 { - panic("no return value specified for PrinterSetLocation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(name, location) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterSetLocation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetLocation' -type MockPkHelper_PrinterSetLocation_Call struct { - *mock.Call -} - -// PrinterSetLocation is a helper method to define mock.On call -// - name string -// - location string -func (_e *MockPkHelper_Expecter) PrinterSetLocation(name interface{}, location interface{}) *MockPkHelper_PrinterSetLocation_Call { - return &MockPkHelper_PrinterSetLocation_Call{Call: _e.mock.On("PrinterSetLocation", name, location)} -} - -func (_c *MockPkHelper_PrinterSetLocation_Call) Run(run func(name string, location string)) *MockPkHelper_PrinterSetLocation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterSetLocation_Call) Return(_a0 error) *MockPkHelper_PrinterSetLocation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterSetLocation_Call) RunAndReturn(run func(string, string) error) *MockPkHelper_PrinterSetLocation_Call { - _c.Call.Return(run) - return _c -} - -// PrinterSetShared provides a mock function with given fields: name, shared -func (_m *MockPkHelper) PrinterSetShared(name string, shared bool) error { - ret := _m.Called(name, shared) - - if len(ret) == 0 { - panic("no return value specified for PrinterSetShared") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(name, shared) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPkHelper_PrinterSetShared_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetShared' -type MockPkHelper_PrinterSetShared_Call struct { - *mock.Call -} - -// PrinterSetShared is a helper method to define mock.On call -// - name string -// - shared bool -func (_e *MockPkHelper_Expecter) PrinterSetShared(name interface{}, shared interface{}) *MockPkHelper_PrinterSetShared_Call { - return &MockPkHelper_PrinterSetShared_Call{Call: _e.mock.On("PrinterSetShared", name, shared)} -} - -func (_c *MockPkHelper_PrinterSetShared_Call) Run(run func(name string, shared bool)) *MockPkHelper_PrinterSetShared_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) - }) - return _c -} - -func (_c *MockPkHelper_PrinterSetShared_Call) Return(_a0 error) *MockPkHelper_PrinterSetShared_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPkHelper_PrinterSetShared_Call) RunAndReturn(run func(string, bool) error) *MockPkHelper_PrinterSetShared_Call { - _c.Call.Return(run) - return _c -} - // NewMockPkHelper creates a new instance of MockPkHelper. 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 NewMockPkHelper(t interface { @@ -706,3 +22,843 @@ func NewMockPkHelper(t interface { return mock } + +// MockPkHelper is an autogenerated mock type for the PkHelper type +type MockPkHelper struct { + mock.Mock +} + +type MockPkHelper_Expecter struct { + mock *mock.Mock +} + +func (_m *MockPkHelper) EXPECT() *MockPkHelper_Expecter { + return &MockPkHelper_Expecter{mock: &_m.Mock} +} + +// ClassAddPrinter provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) ClassAddPrinter(className string, printerName string) error { + ret := _mock.Called(className, printerName) + + if len(ret) == 0 { + panic("no return value specified for ClassAddPrinter") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(className, printerName) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_ClassAddPrinter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassAddPrinter' +type MockPkHelper_ClassAddPrinter_Call struct { + *mock.Call +} + +// ClassAddPrinter is a helper method to define mock.On call +// - className string +// - printerName string +func (_e *MockPkHelper_Expecter) ClassAddPrinter(className any, printerName any) *MockPkHelper_ClassAddPrinter_Call { + return &MockPkHelper_ClassAddPrinter_Call{Call: _e.mock.On("ClassAddPrinter", className, printerName)} +} + +func (_c *MockPkHelper_ClassAddPrinter_Call) Run(run func(className string, printerName string)) *MockPkHelper_ClassAddPrinter_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_ClassAddPrinter_Call) Return(err error) *MockPkHelper_ClassAddPrinter_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_ClassAddPrinter_Call) RunAndReturn(run func(className string, printerName string) error) *MockPkHelper_ClassAddPrinter_Call { + _c.Call.Return(run) + return _c +} + +// ClassDelete provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) ClassDelete(className string) error { + ret := _mock.Called(className) + + if len(ret) == 0 { + panic("no return value specified for ClassDelete") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(className) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_ClassDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassDelete' +type MockPkHelper_ClassDelete_Call struct { + *mock.Call +} + +// ClassDelete is a helper method to define mock.On call +// - className string +func (_e *MockPkHelper_Expecter) ClassDelete(className any) *MockPkHelper_ClassDelete_Call { + return &MockPkHelper_ClassDelete_Call{Call: _e.mock.On("ClassDelete", className)} +} + +func (_c *MockPkHelper_ClassDelete_Call) Run(run func(className string)) *MockPkHelper_ClassDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPkHelper_ClassDelete_Call) Return(err error) *MockPkHelper_ClassDelete_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_ClassDelete_Call) RunAndReturn(run func(className string) error) *MockPkHelper_ClassDelete_Call { + _c.Call.Return(run) + return _c +} + +// ClassDeletePrinter provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) ClassDeletePrinter(className string, printerName string) error { + ret := _mock.Called(className, printerName) + + if len(ret) == 0 { + panic("no return value specified for ClassDeletePrinter") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(className, printerName) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_ClassDeletePrinter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClassDeletePrinter' +type MockPkHelper_ClassDeletePrinter_Call struct { + *mock.Call +} + +// ClassDeletePrinter is a helper method to define mock.On call +// - className string +// - printerName string +func (_e *MockPkHelper_Expecter) ClassDeletePrinter(className any, printerName any) *MockPkHelper_ClassDeletePrinter_Call { + return &MockPkHelper_ClassDeletePrinter_Call{Call: _e.mock.On("ClassDeletePrinter", className, printerName)} +} + +func (_c *MockPkHelper_ClassDeletePrinter_Call) Run(run func(className string, printerName string)) *MockPkHelper_ClassDeletePrinter_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_ClassDeletePrinter_Call) Return(err error) *MockPkHelper_ClassDeletePrinter_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_ClassDeletePrinter_Call) RunAndReturn(run func(className string, printerName string) error) *MockPkHelper_ClassDeletePrinter_Call { + _c.Call.Return(run) + return _c +} + +// DevicesGet provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) DevicesGet(timeout int, limit int, includeSchemes []string, excludeSchemes []string) ([]cups.Device, error) { + ret := _mock.Called(timeout, limit, includeSchemes, excludeSchemes) + + if len(ret) == 0 { + panic("no return value specified for DevicesGet") + } + + var r0 []cups.Device + var r1 error + if returnFunc, ok := ret.Get(0).(func(int, int, []string, []string) ([]cups.Device, error)); ok { + return returnFunc(timeout, limit, includeSchemes, excludeSchemes) + } + if returnFunc, ok := ret.Get(0).(func(int, int, []string, []string) []cups.Device); ok { + r0 = returnFunc(timeout, limit, includeSchemes, excludeSchemes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]cups.Device) + } + } + if returnFunc, ok := ret.Get(1).(func(int, int, []string, []string) error); ok { + r1 = returnFunc(timeout, limit, includeSchemes, excludeSchemes) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockPkHelper_DevicesGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DevicesGet' +type MockPkHelper_DevicesGet_Call struct { + *mock.Call +} + +// DevicesGet is a helper method to define mock.On call +// - timeout int +// - limit int +// - includeSchemes []string +// - excludeSchemes []string +func (_e *MockPkHelper_Expecter) DevicesGet(timeout any, limit any, includeSchemes any, excludeSchemes any) *MockPkHelper_DevicesGet_Call { + return &MockPkHelper_DevicesGet_Call{Call: _e.mock.On("DevicesGet", timeout, limit, includeSchemes, excludeSchemes)} +} + +func (_c *MockPkHelper_DevicesGet_Call) Run(run func(timeout int, limit int, includeSchemes []string, excludeSchemes []string)) *MockPkHelper_DevicesGet_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 int + if args[1] != nil { + arg1 = args[1].(int) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockPkHelper_DevicesGet_Call) Return(devices []cups.Device, err error) *MockPkHelper_DevicesGet_Call { + _c.Call.Return(devices, err) + return _c +} + +func (_c *MockPkHelper_DevicesGet_Call) RunAndReturn(run func(timeout int, limit int, includeSchemes []string, excludeSchemes []string) ([]cups.Device, error)) *MockPkHelper_DevicesGet_Call { + _c.Call.Return(run) + return _c +} + +// JobCancelPurge provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) JobCancelPurge(jobID int, purge bool) error { + ret := _mock.Called(jobID, purge) + + if len(ret) == 0 { + panic("no return value specified for JobCancelPurge") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(int, bool) error); ok { + r0 = returnFunc(jobID, purge) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_JobCancelPurge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobCancelPurge' +type MockPkHelper_JobCancelPurge_Call struct { + *mock.Call +} + +// JobCancelPurge is a helper method to define mock.On call +// - jobID int +// - purge bool +func (_e *MockPkHelper_Expecter) JobCancelPurge(jobID any, purge any) *MockPkHelper_JobCancelPurge_Call { + return &MockPkHelper_JobCancelPurge_Call{Call: _e.mock.On("JobCancelPurge", jobID, purge)} +} + +func (_c *MockPkHelper_JobCancelPurge_Call) Run(run func(jobID int, purge bool)) *MockPkHelper_JobCancelPurge_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_JobCancelPurge_Call) Return(err error) *MockPkHelper_JobCancelPurge_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_JobCancelPurge_Call) RunAndReturn(run func(jobID int, purge bool) error) *MockPkHelper_JobCancelPurge_Call { + _c.Call.Return(run) + return _c +} + +// JobRestart provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) JobRestart(jobID int) error { + ret := _mock.Called(jobID) + + if len(ret) == 0 { + panic("no return value specified for JobRestart") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(int) error); ok { + r0 = returnFunc(jobID) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_JobRestart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobRestart' +type MockPkHelper_JobRestart_Call struct { + *mock.Call +} + +// JobRestart is a helper method to define mock.On call +// - jobID int +func (_e *MockPkHelper_Expecter) JobRestart(jobID any) *MockPkHelper_JobRestart_Call { + return &MockPkHelper_JobRestart_Call{Call: _e.mock.On("JobRestart", jobID)} +} + +func (_c *MockPkHelper_JobRestart_Call) Run(run func(jobID int)) *MockPkHelper_JobRestart_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPkHelper_JobRestart_Call) Return(err error) *MockPkHelper_JobRestart_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_JobRestart_Call) RunAndReturn(run func(jobID int) error) *MockPkHelper_JobRestart_Call { + _c.Call.Return(run) + return _c +} + +// JobSetHoldUntil provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) JobSetHoldUntil(jobID int, holdUntil string) error { + ret := _mock.Called(jobID, holdUntil) + + if len(ret) == 0 { + panic("no return value specified for JobSetHoldUntil") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(int, string) error); ok { + r0 = returnFunc(jobID, holdUntil) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_JobSetHoldUntil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobSetHoldUntil' +type MockPkHelper_JobSetHoldUntil_Call struct { + *mock.Call +} + +// JobSetHoldUntil is a helper method to define mock.On call +// - jobID int +// - holdUntil string +func (_e *MockPkHelper_Expecter) JobSetHoldUntil(jobID any, holdUntil any) *MockPkHelper_JobSetHoldUntil_Call { + return &MockPkHelper_JobSetHoldUntil_Call{Call: _e.mock.On("JobSetHoldUntil", jobID, holdUntil)} +} + +func (_c *MockPkHelper_JobSetHoldUntil_Call) Run(run func(jobID int, holdUntil string)) *MockPkHelper_JobSetHoldUntil_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 int + if args[0] != nil { + arg0 = args[0].(int) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_JobSetHoldUntil_Call) Return(err error) *MockPkHelper_JobSetHoldUntil_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_JobSetHoldUntil_Call) RunAndReturn(run func(jobID int, holdUntil string) error) *MockPkHelper_JobSetHoldUntil_Call { + _c.Call.Return(run) + return _c +} + +// PrinterAdd provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterAdd(name string, uri string, ppd string, info string, location string) error { + ret := _mock.Called(name, uri, ppd, info, location) + + if len(ret) == 0 { + panic("no return value specified for PrinterAdd") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, string, string, string, string) error); ok { + r0 = returnFunc(name, uri, ppd, info, location) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterAdd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterAdd' +type MockPkHelper_PrinterAdd_Call struct { + *mock.Call +} + +// PrinterAdd is a helper method to define mock.On call +// - name string +// - uri string +// - ppd string +// - info string +// - location string +func (_e *MockPkHelper_Expecter) PrinterAdd(name any, uri any, ppd any, info any, location any) *MockPkHelper_PrinterAdd_Call { + return &MockPkHelper_PrinterAdd_Call{Call: _e.mock.On("PrinterAdd", name, uri, ppd, info, location)} +} + +func (_c *MockPkHelper_PrinterAdd_Call) Run(run func(name string, uri string, ppd string, info string, location string)) *MockPkHelper_PrinterAdd_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterAdd_Call) Return(err error) *MockPkHelper_PrinterAdd_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterAdd_Call) RunAndReturn(run func(name string, uri string, ppd string, info string, location string) error) *MockPkHelper_PrinterAdd_Call { + _c.Call.Return(run) + return _c +} + +// PrinterDelete provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterDelete(name string) error { + ret := _mock.Called(name) + + if len(ret) == 0 { + panic("no return value specified for PrinterDelete") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(name) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterDelete' +type MockPkHelper_PrinterDelete_Call struct { + *mock.Call +} + +// PrinterDelete is a helper method to define mock.On call +// - name string +func (_e *MockPkHelper_Expecter) PrinterDelete(name any) *MockPkHelper_PrinterDelete_Call { + return &MockPkHelper_PrinterDelete_Call{Call: _e.mock.On("PrinterDelete", name)} +} + +func (_c *MockPkHelper_PrinterDelete_Call) Run(run func(name string)) *MockPkHelper_PrinterDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterDelete_Call) Return(err error) *MockPkHelper_PrinterDelete_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterDelete_Call) RunAndReturn(run func(name string) error) *MockPkHelper_PrinterDelete_Call { + _c.Call.Return(run) + return _c +} + +// PrinterSetAcceptJobs provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterSetAcceptJobs(name string, enabled bool, reason string) error { + ret := _mock.Called(name, enabled, reason) + + if len(ret) == 0 { + panic("no return value specified for PrinterSetAcceptJobs") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, bool, string) error); ok { + r0 = returnFunc(name, enabled, reason) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterSetAcceptJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetAcceptJobs' +type MockPkHelper_PrinterSetAcceptJobs_Call struct { + *mock.Call +} + +// PrinterSetAcceptJobs is a helper method to define mock.On call +// - name string +// - enabled bool +// - reason string +func (_e *MockPkHelper_Expecter) PrinterSetAcceptJobs(name any, enabled any, reason any) *MockPkHelper_PrinterSetAcceptJobs_Call { + return &MockPkHelper_PrinterSetAcceptJobs_Call{Call: _e.mock.On("PrinterSetAcceptJobs", name, enabled, reason)} +} + +func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) Run(run func(name string, enabled bool, reason string)) *MockPkHelper_PrinterSetAcceptJobs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) Return(err error) *MockPkHelper_PrinterSetAcceptJobs_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterSetAcceptJobs_Call) RunAndReturn(run func(name string, enabled bool, reason string) error) *MockPkHelper_PrinterSetAcceptJobs_Call { + _c.Call.Return(run) + return _c +} + +// PrinterSetEnabled provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterSetEnabled(name string, enabled bool) error { + ret := _mock.Called(name, enabled) + + if len(ret) == 0 { + panic("no return value specified for PrinterSetEnabled") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(name, enabled) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterSetEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetEnabled' +type MockPkHelper_PrinterSetEnabled_Call struct { + *mock.Call +} + +// PrinterSetEnabled is a helper method to define mock.On call +// - name string +// - enabled bool +func (_e *MockPkHelper_Expecter) PrinterSetEnabled(name any, enabled any) *MockPkHelper_PrinterSetEnabled_Call { + return &MockPkHelper_PrinterSetEnabled_Call{Call: _e.mock.On("PrinterSetEnabled", name, enabled)} +} + +func (_c *MockPkHelper_PrinterSetEnabled_Call) Run(run func(name string, enabled bool)) *MockPkHelper_PrinterSetEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterSetEnabled_Call) Return(err error) *MockPkHelper_PrinterSetEnabled_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterSetEnabled_Call) RunAndReturn(run func(name string, enabled bool) error) *MockPkHelper_PrinterSetEnabled_Call { + _c.Call.Return(run) + return _c +} + +// PrinterSetInfo provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterSetInfo(name string, info string) error { + ret := _mock.Called(name, info) + + if len(ret) == 0 { + panic("no return value specified for PrinterSetInfo") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(name, info) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterSetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetInfo' +type MockPkHelper_PrinterSetInfo_Call struct { + *mock.Call +} + +// PrinterSetInfo is a helper method to define mock.On call +// - name string +// - info string +func (_e *MockPkHelper_Expecter) PrinterSetInfo(name any, info any) *MockPkHelper_PrinterSetInfo_Call { + return &MockPkHelper_PrinterSetInfo_Call{Call: _e.mock.On("PrinterSetInfo", name, info)} +} + +func (_c *MockPkHelper_PrinterSetInfo_Call) Run(run func(name string, info string)) *MockPkHelper_PrinterSetInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterSetInfo_Call) Return(err error) *MockPkHelper_PrinterSetInfo_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterSetInfo_Call) RunAndReturn(run func(name string, info string) error) *MockPkHelper_PrinterSetInfo_Call { + _c.Call.Return(run) + return _c +} + +// PrinterSetLocation provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterSetLocation(name string, location string) error { + ret := _mock.Called(name, location) + + if len(ret) == 0 { + panic("no return value specified for PrinterSetLocation") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(name, location) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterSetLocation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetLocation' +type MockPkHelper_PrinterSetLocation_Call struct { + *mock.Call +} + +// PrinterSetLocation is a helper method to define mock.On call +// - name string +// - location string +func (_e *MockPkHelper_Expecter) PrinterSetLocation(name any, location any) *MockPkHelper_PrinterSetLocation_Call { + return &MockPkHelper_PrinterSetLocation_Call{Call: _e.mock.On("PrinterSetLocation", name, location)} +} + +func (_c *MockPkHelper_PrinterSetLocation_Call) Run(run func(name string, location string)) *MockPkHelper_PrinterSetLocation_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterSetLocation_Call) Return(err error) *MockPkHelper_PrinterSetLocation_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterSetLocation_Call) RunAndReturn(run func(name string, location string) error) *MockPkHelper_PrinterSetLocation_Call { + _c.Call.Return(run) + return _c +} + +// PrinterSetShared provides a mock function for the type MockPkHelper +func (_mock *MockPkHelper) PrinterSetShared(name string, shared bool) error { + ret := _mock.Called(name, shared) + + if len(ret) == 0 { + panic("no return value specified for PrinterSetShared") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(name, shared) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockPkHelper_PrinterSetShared_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrinterSetShared' +type MockPkHelper_PrinterSetShared_Call struct { + *mock.Call +} + +// PrinterSetShared is a helper method to define mock.On call +// - name string +// - shared bool +func (_e *MockPkHelper_Expecter) PrinterSetShared(name any, shared any) *MockPkHelper_PrinterSetShared_Call { + return &MockPkHelper_PrinterSetShared_Call{Call: _e.mock.On("PrinterSetShared", name, shared)} +} + +func (_c *MockPkHelper_PrinterSetShared_Call) Run(run func(name string, shared bool)) *MockPkHelper_PrinterSetShared_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockPkHelper_PrinterSetShared_Call) Return(err error) *MockPkHelper_PrinterSetShared_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockPkHelper_PrinterSetShared_Call) RunAndReturn(run func(name string, shared bool) error) *MockPkHelper_PrinterSetShared_Call { + _c.Call.Return(run) + return _c +} diff --git a/core/internal/mocks/evdev/mock_EvdevDevice.go b/core/internal/mocks/evdev/mock_EvdevDevice.go index 4d54e3e5..8f6b1947 100644 --- a/core/internal/mocks/evdev/mock_EvdevDevice.go +++ b/core/internal/mocks/evdev/mock_EvdevDevice.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_evdev import ( - go_evdev "github.com/holoplot/go-evdev" + "github.com/holoplot/go-evdev" mock "github.com/stretchr/testify/mock" ) +// NewMockEvdevDevice creates a new instance of MockEvdevDevice. 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 NewMockEvdevDevice(t interface { + mock.TestingT + Cleanup(func()) +}) *MockEvdevDevice { + mock := &MockEvdevDevice{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockEvdevDevice is an autogenerated mock type for the EvdevDevice type type MockEvdevDevice struct { mock.Mock @@ -20,21 +36,20 @@ func (_m *MockEvdevDevice) EXPECT() *MockEvdevDevice_Expecter { return &MockEvdevDevice_Expecter{mock: &_m.Mock} } -// Close provides a mock function with no fields -func (_m *MockEvdevDevice) Close() error { - ret := _m.Called() +// Close provides a mock function for the type MockEvdevDevice +func (_mock *MockEvdevDevice) Close() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -55,8 +70,8 @@ func (_c *MockEvdevDevice_Close_Call) Run(run func()) *MockEvdevDevice_Close_Cal return _c } -func (_c *MockEvdevDevice_Close_Call) Return(_a0 error) *MockEvdevDevice_Close_Call { - _c.Call.Return(_a0) +func (_c *MockEvdevDevice_Close_Call) Return(err error) *MockEvdevDevice_Close_Call { + _c.Call.Return(err) return _c } @@ -65,9 +80,9 @@ func (_c *MockEvdevDevice_Close_Call) RunAndReturn(run func() error) *MockEvdevD return _c } -// Name provides a mock function with no fields -func (_m *MockEvdevDevice) Name() (string, error) { - ret := _m.Called() +// Name provides a mock function for the type MockEvdevDevice +func (_mock *MockEvdevDevice) Name() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Name") @@ -75,21 +90,19 @@ func (_m *MockEvdevDevice) Name() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -110,8 +123,8 @@ func (_c *MockEvdevDevice_Name_Call) Run(run func()) *MockEvdevDevice_Name_Call return _c } -func (_c *MockEvdevDevice_Name_Call) Return(_a0 string, _a1 error) *MockEvdevDevice_Name_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockEvdevDevice_Name_Call) Return(s string, err error) *MockEvdevDevice_Name_Call { + _c.Call.Return(s, err) return _c } @@ -120,21 +133,20 @@ func (_c *MockEvdevDevice_Name_Call) RunAndReturn(run func() (string, error)) *M return _c } -// Path provides a mock function with no fields -func (_m *MockEvdevDevice) Path() string { - ret := _m.Called() +// Path provides a mock function for the type MockEvdevDevice +func (_mock *MockEvdevDevice) Path() string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Path") } var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - return r0 } @@ -155,8 +167,8 @@ func (_c *MockEvdevDevice_Path_Call) Run(run func()) *MockEvdevDevice_Path_Call return _c } -func (_c *MockEvdevDevice_Path_Call) Return(_a0 string) *MockEvdevDevice_Path_Call { - _c.Call.Return(_a0) +func (_c *MockEvdevDevice_Path_Call) Return(s string) *MockEvdevDevice_Path_Call { + _c.Call.Return(s) return _c } @@ -165,33 +177,31 @@ func (_c *MockEvdevDevice_Path_Call) RunAndReturn(run func() string) *MockEvdevD return _c } -// ReadOne provides a mock function with no fields -func (_m *MockEvdevDevice) ReadOne() (*go_evdev.InputEvent, error) { - ret := _m.Called() +// ReadOne provides a mock function for the type MockEvdevDevice +func (_mock *MockEvdevDevice) ReadOne() (*evdev.InputEvent, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ReadOne") } - var r0 *go_evdev.InputEvent + var r0 *evdev.InputEvent var r1 error - if rf, ok := ret.Get(0).(func() (*go_evdev.InputEvent, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*evdev.InputEvent, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *go_evdev.InputEvent); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *evdev.InputEvent); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*go_evdev.InputEvent) + r0 = ret.Get(0).(*evdev.InputEvent) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -212,43 +222,41 @@ func (_c *MockEvdevDevice_ReadOne_Call) Run(run func()) *MockEvdevDevice_ReadOne return _c } -func (_c *MockEvdevDevice_ReadOne_Call) Return(_a0 *go_evdev.InputEvent, _a1 error) *MockEvdevDevice_ReadOne_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockEvdevDevice_ReadOne_Call) Return(inputEvent *evdev.InputEvent, err error) *MockEvdevDevice_ReadOne_Call { + _c.Call.Return(inputEvent, err) return _c } -func (_c *MockEvdevDevice_ReadOne_Call) RunAndReturn(run func() (*go_evdev.InputEvent, error)) *MockEvdevDevice_ReadOne_Call { +func (_c *MockEvdevDevice_ReadOne_Call) RunAndReturn(run func() (*evdev.InputEvent, error)) *MockEvdevDevice_ReadOne_Call { _c.Call.Return(run) return _c } -// State provides a mock function with given fields: t -func (_m *MockEvdevDevice) State(t go_evdev.EvType) (go_evdev.StateMap, error) { - ret := _m.Called(t) +// State provides a mock function for the type MockEvdevDevice +func (_mock *MockEvdevDevice) State(t evdev.EvType) (evdev.StateMap, error) { + ret := _mock.Called(t) if len(ret) == 0 { panic("no return value specified for State") } - var r0 go_evdev.StateMap + var r0 evdev.StateMap var r1 error - if rf, ok := ret.Get(0).(func(go_evdev.EvType) (go_evdev.StateMap, error)); ok { - return rf(t) + if returnFunc, ok := ret.Get(0).(func(evdev.EvType) (evdev.StateMap, error)); ok { + return returnFunc(t) } - if rf, ok := ret.Get(0).(func(go_evdev.EvType) go_evdev.StateMap); ok { - r0 = rf(t) + if returnFunc, ok := ret.Get(0).(func(evdev.EvType) evdev.StateMap); ok { + r0 = returnFunc(t) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(go_evdev.StateMap) + r0 = ret.Get(0).(evdev.StateMap) } } - - if rf, ok := ret.Get(1).(func(go_evdev.EvType) error); ok { - r1 = rf(t) + if returnFunc, ok := ret.Get(1).(func(evdev.EvType) error); ok { + r1 = returnFunc(t) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -258,38 +266,30 @@ type MockEvdevDevice_State_Call struct { } // State is a helper method to define mock.On call -// - t go_evdev.EvType -func (_e *MockEvdevDevice_Expecter) State(t interface{}) *MockEvdevDevice_State_Call { +// - t evdev.EvType +func (_e *MockEvdevDevice_Expecter) State(t any) *MockEvdevDevice_State_Call { return &MockEvdevDevice_State_Call{Call: _e.mock.On("State", t)} } -func (_c *MockEvdevDevice_State_Call) Run(run func(t go_evdev.EvType)) *MockEvdevDevice_State_Call { +func (_c *MockEvdevDevice_State_Call) Run(run func(t evdev.EvType)) *MockEvdevDevice_State_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(go_evdev.EvType)) + var arg0 evdev.EvType + if args[0] != nil { + arg0 = args[0].(evdev.EvType) + } + run( + arg0, + ) }) return _c } -func (_c *MockEvdevDevice_State_Call) Return(_a0 go_evdev.StateMap, _a1 error) *MockEvdevDevice_State_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockEvdevDevice_State_Call) Return(stateMap evdev.StateMap, err error) *MockEvdevDevice_State_Call { + _c.Call.Return(stateMap, err) return _c } -func (_c *MockEvdevDevice_State_Call) RunAndReturn(run func(go_evdev.EvType) (go_evdev.StateMap, error)) *MockEvdevDevice_State_Call { +func (_c *MockEvdevDevice_State_Call) RunAndReturn(run func(t evdev.EvType) (evdev.StateMap, error)) *MockEvdevDevice_State_Call { _c.Call.Return(run) return _c } - -// NewMockEvdevDevice creates a new instance of MockEvdevDevice. 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 NewMockEvdevDevice(t interface { - mock.TestingT - Cleanup(func()) -}) *MockEvdevDevice { - mock := &MockEvdevDevice{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/geolocation/mock_Client.go b/core/internal/mocks/geolocation/mock_Client.go index bf097cb8..7252bbf5 100644 --- a/core/internal/mocks/geolocation/mock_Client.go +++ b/core/internal/mocks/geolocation/mock_Client.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_geolocation import ( - geolocation "github.com/AvengeMedia/DankMaterialShell/core/internal/geolocation" + "github.com/AvengeMedia/DankMaterialShell/core/internal/geolocation" mock "github.com/stretchr/testify/mock" ) +// NewMockClient creates a new instance of MockClient. 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 NewMockClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockClient { + mock := &MockClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockClient is an autogenerated mock type for the Client type type MockClient struct { mock.Mock @@ -20,9 +36,10 @@ func (_m *MockClient) EXPECT() *MockClient_Expecter { return &MockClient_Expecter{mock: &_m.Mock} } -// Close provides a mock function with no fields -func (_m *MockClient) Close() { - _m.Called() +// Close provides a mock function for the type MockClient +func (_mock *MockClient) Close() { + _mock.Called() + return } // MockClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' @@ -52,9 +69,9 @@ func (_c *MockClient_Close_Call) RunAndReturn(run func()) *MockClient_Close_Call return _c } -// GetLocation provides a mock function with no fields -func (_m *MockClient) GetLocation() (geolocation.Location, error) { - ret := _m.Called() +// GetLocation provides a mock function for the type MockClient +func (_mock *MockClient) GetLocation() (geolocation.Location, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetLocation") @@ -62,21 +79,19 @@ func (_m *MockClient) GetLocation() (geolocation.Location, error) { var r0 geolocation.Location var r1 error - if rf, ok := ret.Get(0).(func() (geolocation.Location, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (geolocation.Location, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() geolocation.Location); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() geolocation.Location); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(geolocation.Location) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -97,8 +112,8 @@ func (_c *MockClient_GetLocation_Call) Run(run func()) *MockClient_GetLocation_C return _c } -func (_c *MockClient_GetLocation_Call) Return(_a0 geolocation.Location, _a1 error) *MockClient_GetLocation_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockClient_GetLocation_Call) Return(location geolocation.Location, err error) *MockClient_GetLocation_Call { + _c.Call.Return(location, err) return _c } @@ -107,23 +122,22 @@ func (_c *MockClient_GetLocation_Call) RunAndReturn(run func() (geolocation.Loca return _c } -// Subscribe provides a mock function with given fields: id -func (_m *MockClient) Subscribe(id string) chan geolocation.Location { - ret := _m.Called(id) +// Subscribe provides a mock function for the type MockClient +func (_mock *MockClient) Subscribe(id string) chan geolocation.Location { + ret := _mock.Called(id) if len(ret) == 0 { panic("no return value specified for Subscribe") } var r0 chan geolocation.Location - if rf, ok := ret.Get(0).(func(string) chan geolocation.Location); ok { - r0 = rf(id) + if returnFunc, ok := ret.Get(0).(func(string) chan geolocation.Location); ok { + r0 = returnFunc(id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(chan geolocation.Location) } } - return r0 } @@ -134,30 +148,37 @@ type MockClient_Subscribe_Call struct { // Subscribe is a helper method to define mock.On call // - id string -func (_e *MockClient_Expecter) Subscribe(id interface{}) *MockClient_Subscribe_Call { +func (_e *MockClient_Expecter) Subscribe(id any) *MockClient_Subscribe_Call { return &MockClient_Subscribe_Call{Call: _e.mock.On("Subscribe", id)} } func (_c *MockClient_Subscribe_Call) Run(run func(id string)) *MockClient_Subscribe_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockClient_Subscribe_Call) Return(_a0 chan geolocation.Location) *MockClient_Subscribe_Call { - _c.Call.Return(_a0) +func (_c *MockClient_Subscribe_Call) Return(locationCh chan geolocation.Location) *MockClient_Subscribe_Call { + _c.Call.Return(locationCh) return _c } -func (_c *MockClient_Subscribe_Call) RunAndReturn(run func(string) chan geolocation.Location) *MockClient_Subscribe_Call { +func (_c *MockClient_Subscribe_Call) RunAndReturn(run func(id string) chan geolocation.Location) *MockClient_Subscribe_Call { _c.Call.Return(run) return _c } -// Unsubscribe provides a mock function with given fields: id -func (_m *MockClient) Unsubscribe(id string) { - _m.Called(id) +// Unsubscribe provides a mock function for the type MockClient +func (_mock *MockClient) Unsubscribe(id string) { + _mock.Called(id) + return } // MockClient_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' @@ -167,13 +188,19 @@ type MockClient_Unsubscribe_Call struct { // Unsubscribe is a helper method to define mock.On call // - id string -func (_e *MockClient_Expecter) Unsubscribe(id interface{}) *MockClient_Unsubscribe_Call { +func (_e *MockClient_Expecter) Unsubscribe(id any) *MockClient_Unsubscribe_Call { return &MockClient_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", id)} } func (_c *MockClient_Unsubscribe_Call) Run(run func(id string)) *MockClient_Unsubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } @@ -183,21 +210,7 @@ func (_c *MockClient_Unsubscribe_Call) Return() *MockClient_Unsubscribe_Call { return _c } -func (_c *MockClient_Unsubscribe_Call) RunAndReturn(run func(string)) *MockClient_Unsubscribe_Call { +func (_c *MockClient_Unsubscribe_Call) RunAndReturn(run func(id string)) *MockClient_Unsubscribe_Call { _c.Run(run) return _c } - -// NewMockClient creates a new instance of MockClient. 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 NewMockClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClient { - mock := &MockClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_AccessPoint.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_AccessPoint.go index ae5124da..822cfa53 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_AccessPoint.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_AccessPoint.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockAccessPoint creates a new instance of MockAccessPoint. 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 NewMockAccessPoint(t interface { + mock.TestingT + Cleanup(func()) +}) *MockAccessPoint { + mock := &MockAccessPoint{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockAccessPoint is an autogenerated mock type for the AccessPoint type type MockAccessPoint struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *MockAccessPoint) EXPECT() *MockAccessPoint_Expecter { return &MockAccessPoint_Expecter{mock: &_m.Mock} } -// GetPath provides a mock function with no fields -func (_m *MockAccessPoint) GetPath() dbus.ObjectPath { - ret := _m.Called() +// GetPath provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPath() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPath") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -57,8 +71,8 @@ func (_c *MockAccessPoint_GetPath_Call) Run(run func()) *MockAccessPoint_GetPath return _c } -func (_c *MockAccessPoint_GetPath_Call) Return(_a0 dbus.ObjectPath) *MockAccessPoint_GetPath_Call { - _c.Call.Return(_a0) +func (_c *MockAccessPoint_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockAccessPoint_GetPath_Call { + _c.Call.Return(objectPath) return _c } @@ -67,9 +81,9 @@ func (_c *MockAccessPoint_GetPath_Call) RunAndReturn(run func() dbus.ObjectPath) return _c } -// GetPropertyFlags provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyFlags() (uint32, error) { - ret := _m.Called() +// GetPropertyFlags provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyFlags() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFlags") @@ -77,21 +91,19 @@ func (_m *MockAccessPoint) GetPropertyFlags() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -112,8 +124,8 @@ func (_c *MockAccessPoint_GetPropertyFlags_Call) Run(run func()) *MockAccessPoin return _c } -func (_c *MockAccessPoint_GetPropertyFlags_Call) Return(_a0 uint32, _a1 error) *MockAccessPoint_GetPropertyFlags_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyFlags_Call) Return(v uint32, err error) *MockAccessPoint_GetPropertyFlags_Call { + _c.Call.Return(v, err) return _c } @@ -122,9 +134,9 @@ func (_c *MockAccessPoint_GetPropertyFlags_Call) RunAndReturn(run func() (uint32 return _c } -// GetPropertyFrequency provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyFrequency() (uint32, error) { - ret := _m.Called() +// GetPropertyFrequency provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyFrequency() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFrequency") @@ -132,21 +144,19 @@ func (_m *MockAccessPoint) GetPropertyFrequency() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -167,8 +177,8 @@ func (_c *MockAccessPoint_GetPropertyFrequency_Call) Run(run func()) *MockAccess return _c } -func (_c *MockAccessPoint_GetPropertyFrequency_Call) Return(_a0 uint32, _a1 error) *MockAccessPoint_GetPropertyFrequency_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyFrequency_Call) Return(v uint32, err error) *MockAccessPoint_GetPropertyFrequency_Call { + _c.Call.Return(v, err) return _c } @@ -177,9 +187,9 @@ func (_c *MockAccessPoint_GetPropertyFrequency_Call) RunAndReturn(run func() (ui return _c } -// GetPropertyHWAddress provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyHWAddress() (string, error) { - ret := _m.Called() +// GetPropertyHWAddress provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyHWAddress() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyHWAddress") @@ -187,21 +197,19 @@ func (_m *MockAccessPoint) GetPropertyHWAddress() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -222,8 +230,8 @@ func (_c *MockAccessPoint_GetPropertyHWAddress_Call) Run(run func()) *MockAccess return _c } -func (_c *MockAccessPoint_GetPropertyHWAddress_Call) Return(_a0 string, _a1 error) *MockAccessPoint_GetPropertyHWAddress_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyHWAddress_Call) Return(s string, err error) *MockAccessPoint_GetPropertyHWAddress_Call { + _c.Call.Return(s, err) return _c } @@ -232,9 +240,9 @@ func (_c *MockAccessPoint_GetPropertyHWAddress_Call) RunAndReturn(run func() (st return _c } -// GetPropertyLastSeen provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyLastSeen() (int32, error) { - ret := _m.Called() +// GetPropertyLastSeen provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyLastSeen() (int32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyLastSeen") @@ -242,21 +250,19 @@ func (_m *MockAccessPoint) GetPropertyLastSeen() (int32, error) { var r0 int32 var r1 error - if rf, ok := ret.Get(0).(func() (int32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (int32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() int32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() int32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(int32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -277,8 +283,8 @@ func (_c *MockAccessPoint_GetPropertyLastSeen_Call) Run(run func()) *MockAccessP return _c } -func (_c *MockAccessPoint_GetPropertyLastSeen_Call) Return(_a0 int32, _a1 error) *MockAccessPoint_GetPropertyLastSeen_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyLastSeen_Call) Return(n int32, err error) *MockAccessPoint_GetPropertyLastSeen_Call { + _c.Call.Return(n, err) return _c } @@ -287,9 +293,9 @@ func (_c *MockAccessPoint_GetPropertyLastSeen_Call) RunAndReturn(run func() (int return _c } -// GetPropertyMaxBitrate provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyMaxBitrate() (uint32, error) { - ret := _m.Called() +// GetPropertyMaxBitrate provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyMaxBitrate() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMaxBitrate") @@ -297,21 +303,19 @@ func (_m *MockAccessPoint) GetPropertyMaxBitrate() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -332,8 +336,8 @@ func (_c *MockAccessPoint_GetPropertyMaxBitrate_Call) Run(run func()) *MockAcces return _c } -func (_c *MockAccessPoint_GetPropertyMaxBitrate_Call) Return(_a0 uint32, _a1 error) *MockAccessPoint_GetPropertyMaxBitrate_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyMaxBitrate_Call) Return(v uint32, err error) *MockAccessPoint_GetPropertyMaxBitrate_Call { + _c.Call.Return(v, err) return _c } @@ -342,9 +346,9 @@ func (_c *MockAccessPoint_GetPropertyMaxBitrate_Call) RunAndReturn(run func() (u return _c } -// GetPropertyMode provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyMode() (gonetworkmanager.Nm80211Mode, error) { - ret := _m.Called() +// GetPropertyMode provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyMode() (gonetworkmanager.Nm80211Mode, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMode") @@ -352,21 +356,19 @@ func (_m *MockAccessPoint) GetPropertyMode() (gonetworkmanager.Nm80211Mode, erro var r0 gonetworkmanager.Nm80211Mode var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.Nm80211Mode, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.Nm80211Mode, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.Nm80211Mode); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.Nm80211Mode); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.Nm80211Mode) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -387,8 +389,8 @@ func (_c *MockAccessPoint_GetPropertyMode_Call) Run(run func()) *MockAccessPoint return _c } -func (_c *MockAccessPoint_GetPropertyMode_Call) Return(_a0 gonetworkmanager.Nm80211Mode, _a1 error) *MockAccessPoint_GetPropertyMode_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyMode_Call) Return(nm80211Mode gonetworkmanager.Nm80211Mode, err error) *MockAccessPoint_GetPropertyMode_Call { + _c.Call.Return(nm80211Mode, err) return _c } @@ -397,9 +399,9 @@ func (_c *MockAccessPoint_GetPropertyMode_Call) RunAndReturn(run func() (gonetwo return _c } -// GetPropertyRSNFlags provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyRSNFlags() (uint32, error) { - ret := _m.Called() +// GetPropertyRSNFlags provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyRSNFlags() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyRSNFlags") @@ -407,21 +409,19 @@ func (_m *MockAccessPoint) GetPropertyRSNFlags() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -442,8 +442,8 @@ func (_c *MockAccessPoint_GetPropertyRSNFlags_Call) Run(run func()) *MockAccessP return _c } -func (_c *MockAccessPoint_GetPropertyRSNFlags_Call) Return(_a0 uint32, _a1 error) *MockAccessPoint_GetPropertyRSNFlags_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyRSNFlags_Call) Return(v uint32, err error) *MockAccessPoint_GetPropertyRSNFlags_Call { + _c.Call.Return(v, err) return _c } @@ -452,9 +452,9 @@ func (_c *MockAccessPoint_GetPropertyRSNFlags_Call) RunAndReturn(run func() (uin return _c } -// GetPropertySSID provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertySSID() (string, error) { - ret := _m.Called() +// GetPropertySSID provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertySSID() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertySSID") @@ -462,21 +462,19 @@ func (_m *MockAccessPoint) GetPropertySSID() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -497,8 +495,8 @@ func (_c *MockAccessPoint_GetPropertySSID_Call) Run(run func()) *MockAccessPoint return _c } -func (_c *MockAccessPoint_GetPropertySSID_Call) Return(_a0 string, _a1 error) *MockAccessPoint_GetPropertySSID_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertySSID_Call) Return(s string, err error) *MockAccessPoint_GetPropertySSID_Call { + _c.Call.Return(s, err) return _c } @@ -507,9 +505,9 @@ func (_c *MockAccessPoint_GetPropertySSID_Call) RunAndReturn(run func() (string, return _c } -// GetPropertyStrength provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyStrength() (uint8, error) { - ret := _m.Called() +// GetPropertyStrength provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyStrength() (uint8, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyStrength") @@ -517,21 +515,19 @@ func (_m *MockAccessPoint) GetPropertyStrength() (uint8, error) { var r0 uint8 var r1 error - if rf, ok := ret.Get(0).(func() (uint8, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint8, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint8); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint8) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -552,8 +548,8 @@ func (_c *MockAccessPoint_GetPropertyStrength_Call) Run(run func()) *MockAccessP return _c } -func (_c *MockAccessPoint_GetPropertyStrength_Call) Return(_a0 uint8, _a1 error) *MockAccessPoint_GetPropertyStrength_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyStrength_Call) Return(v uint8, err error) *MockAccessPoint_GetPropertyStrength_Call { + _c.Call.Return(v, err) return _c } @@ -562,9 +558,9 @@ func (_c *MockAccessPoint_GetPropertyStrength_Call) RunAndReturn(run func() (uin return _c } -// GetPropertyWPAFlags provides a mock function with no fields -func (_m *MockAccessPoint) GetPropertyWPAFlags() (uint32, error) { - ret := _m.Called() +// GetPropertyWPAFlags provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) GetPropertyWPAFlags() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWPAFlags") @@ -572,21 +568,19 @@ func (_m *MockAccessPoint) GetPropertyWPAFlags() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -607,8 +601,8 @@ func (_c *MockAccessPoint_GetPropertyWPAFlags_Call) Run(run func()) *MockAccessP return _c } -func (_c *MockAccessPoint_GetPropertyWPAFlags_Call) Return(_a0 uint32, _a1 error) *MockAccessPoint_GetPropertyWPAFlags_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_GetPropertyWPAFlags_Call) Return(v uint32, err error) *MockAccessPoint_GetPropertyWPAFlags_Call { + _c.Call.Return(v, err) return _c } @@ -617,9 +611,9 @@ func (_c *MockAccessPoint_GetPropertyWPAFlags_Call) RunAndReturn(run func() (uin return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockAccessPoint) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockAccessPoint +func (_mock *MockAccessPoint) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -627,23 +621,21 @@ func (_m *MockAccessPoint) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -664,8 +656,8 @@ func (_c *MockAccessPoint_MarshalJSON_Call) Run(run func()) *MockAccessPoint_Mar return _c } -func (_c *MockAccessPoint_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockAccessPoint_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockAccessPoint_MarshalJSON_Call) Return(bytes []byte, err error) *MockAccessPoint_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -673,17 +665,3 @@ func (_c *MockAccessPoint_MarshalJSON_Call) RunAndReturn(run func() ([]byte, err _c.Call.Return(run) return _c } - -// NewMockAccessPoint creates a new instance of MockAccessPoint. 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 NewMockAccessPoint(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccessPoint { - mock := &MockAccessPoint{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_ActiveConnection.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_ActiveConnection.go index a4e3344e..5edf324c 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_ActiveConnection.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_ActiveConnection.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockActiveConnection creates a new instance of MockActiveConnection. 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 NewMockActiveConnection(t interface { + mock.TestingT + Cleanup(func()) +}) *MockActiveConnection { + mock := &MockActiveConnection{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockActiveConnection is an autogenerated mock type for the ActiveConnection type type MockActiveConnection struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *MockActiveConnection) EXPECT() *MockActiveConnection_Expecter { return &MockActiveConnection_Expecter{mock: &_m.Mock} } -// GetPath provides a mock function with no fields -func (_m *MockActiveConnection) GetPath() dbus.ObjectPath { - ret := _m.Called() +// GetPath provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPath() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPath") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -57,8 +71,8 @@ func (_c *MockActiveConnection_GetPath_Call) Run(run func()) *MockActiveConnecti return _c } -func (_c *MockActiveConnection_GetPath_Call) Return(_a0 dbus.ObjectPath) *MockActiveConnection_GetPath_Call { - _c.Call.Return(_a0) +func (_c *MockActiveConnection_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockActiveConnection_GetPath_Call { + _c.Call.Return(objectPath) return _c } @@ -67,9 +81,9 @@ func (_c *MockActiveConnection_GetPath_Call) RunAndReturn(run func() dbus.Object return _c } -// GetPropertyConnection provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyConnection() (gonetworkmanager.Connection, error) { - ret := _m.Called() +// GetPropertyConnection provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyConnection() (gonetworkmanager.Connection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyConnection") @@ -77,23 +91,21 @@ func (_m *MockActiveConnection) GetPropertyConnection() (gonetworkmanager.Connec var r0 gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.Connection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.Connection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.Connection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.Connection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -114,8 +126,8 @@ func (_c *MockActiveConnection_GetPropertyConnection_Call) Run(run func()) *Mock return _c } -func (_c *MockActiveConnection_GetPropertyConnection_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockActiveConnection_GetPropertyConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyConnection_Call) Return(connection gonetworkmanager.Connection, err error) *MockActiveConnection_GetPropertyConnection_Call { + _c.Call.Return(connection, err) return _c } @@ -124,9 +136,9 @@ func (_c *MockActiveConnection_GetPropertyConnection_Call) RunAndReturn(run func return _c } -// GetPropertyDHCP4Config provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { - ret := _m.Called() +// GetPropertyDHCP4Config provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP4Config") @@ -134,23 +146,21 @@ func (_m *MockActiveConnection) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4 var r0 gonetworkmanager.DHCP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -171,8 +181,8 @@ func (_c *MockActiveConnection_GetPropertyDHCP4Config_Call) Run(run func()) *Moc return _c } -func (_c *MockActiveConnection_GetPropertyDHCP4Config_Call) Return(_a0 gonetworkmanager.DHCP4Config, _a1 error) *MockActiveConnection_GetPropertyDHCP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyDHCP4Config_Call) Return(dHCP4Config gonetworkmanager.DHCP4Config, err error) *MockActiveConnection_GetPropertyDHCP4Config_Call { + _c.Call.Return(dHCP4Config, err) return _c } @@ -181,9 +191,9 @@ func (_c *MockActiveConnection_GetPropertyDHCP4Config_Call) RunAndReturn(run fun return _c } -// GetPropertyDHCP6Config provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { - ret := _m.Called() +// GetPropertyDHCP6Config provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP6Config") @@ -191,23 +201,21 @@ func (_m *MockActiveConnection) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6 var r0 gonetworkmanager.DHCP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -228,8 +236,8 @@ func (_c *MockActiveConnection_GetPropertyDHCP6Config_Call) Run(run func()) *Moc return _c } -func (_c *MockActiveConnection_GetPropertyDHCP6Config_Call) Return(_a0 gonetworkmanager.DHCP6Config, _a1 error) *MockActiveConnection_GetPropertyDHCP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyDHCP6Config_Call) Return(dHCP6Config gonetworkmanager.DHCP6Config, err error) *MockActiveConnection_GetPropertyDHCP6Config_Call { + _c.Call.Return(dHCP6Config, err) return _c } @@ -238,9 +246,9 @@ func (_c *MockActiveConnection_GetPropertyDHCP6Config_Call) RunAndReturn(run fun return _c } -// GetPropertyDefault provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyDefault() (bool, error) { - ret := _m.Called() +// GetPropertyDefault provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyDefault() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDefault") @@ -248,21 +256,19 @@ func (_m *MockActiveConnection) GetPropertyDefault() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -283,8 +289,8 @@ func (_c *MockActiveConnection_GetPropertyDefault_Call) Run(run func()) *MockAct return _c } -func (_c *MockActiveConnection_GetPropertyDefault_Call) Return(_a0 bool, _a1 error) *MockActiveConnection_GetPropertyDefault_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyDefault_Call) Return(b bool, err error) *MockActiveConnection_GetPropertyDefault_Call { + _c.Call.Return(b, err) return _c } @@ -293,9 +299,9 @@ func (_c *MockActiveConnection_GetPropertyDefault_Call) RunAndReturn(run func() return _c } -// GetPropertyDefault6 provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyDefault6() (bool, error) { - ret := _m.Called() +// GetPropertyDefault6 provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyDefault6() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDefault6") @@ -303,21 +309,19 @@ func (_m *MockActiveConnection) GetPropertyDefault6() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -338,8 +342,8 @@ func (_c *MockActiveConnection_GetPropertyDefault6_Call) Run(run func()) *MockAc return _c } -func (_c *MockActiveConnection_GetPropertyDefault6_Call) Return(_a0 bool, _a1 error) *MockActiveConnection_GetPropertyDefault6_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyDefault6_Call) Return(b bool, err error) *MockActiveConnection_GetPropertyDefault6_Call { + _c.Call.Return(b, err) return _c } @@ -348,9 +352,9 @@ func (_c *MockActiveConnection_GetPropertyDefault6_Call) RunAndReturn(run func() return _c } -// GetPropertyDevices provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyDevices() ([]gonetworkmanager.Device, error) { - ret := _m.Called() +// GetPropertyDevices provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyDevices() ([]gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDevices") @@ -358,23 +362,21 @@ func (_m *MockActiveConnection) GetPropertyDevices() ([]gonetworkmanager.Device, var r0 []gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -395,8 +397,8 @@ func (_c *MockActiveConnection_GetPropertyDevices_Call) Run(run func()) *MockAct return _c } -func (_c *MockActiveConnection_GetPropertyDevices_Call) Return(_a0 []gonetworkmanager.Device, _a1 error) *MockActiveConnection_GetPropertyDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyDevices_Call) Return(devices []gonetworkmanager.Device, err error) *MockActiveConnection_GetPropertyDevices_Call { + _c.Call.Return(devices, err) return _c } @@ -405,9 +407,9 @@ func (_c *MockActiveConnection_GetPropertyDevices_Call) RunAndReturn(run func() return _c } -// GetPropertyID provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyID() (string, error) { - ret := _m.Called() +// GetPropertyID provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyID() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyID") @@ -415,21 +417,19 @@ func (_m *MockActiveConnection) GetPropertyID() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -450,8 +450,8 @@ func (_c *MockActiveConnection_GetPropertyID_Call) Run(run func()) *MockActiveCo return _c } -func (_c *MockActiveConnection_GetPropertyID_Call) Return(_a0 string, _a1 error) *MockActiveConnection_GetPropertyID_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyID_Call) Return(s string, err error) *MockActiveConnection_GetPropertyID_Call { + _c.Call.Return(s, err) return _c } @@ -460,9 +460,9 @@ func (_c *MockActiveConnection_GetPropertyID_Call) RunAndReturn(run func() (stri return _c } -// GetPropertyIP4Config provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { - ret := _m.Called() +// GetPropertyIP4Config provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP4Config") @@ -470,23 +470,21 @@ func (_m *MockActiveConnection) GetPropertyIP4Config() (gonetworkmanager.IP4Conf var r0 gonetworkmanager.IP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -507,8 +505,8 @@ func (_c *MockActiveConnection_GetPropertyIP4Config_Call) Run(run func()) *MockA return _c } -func (_c *MockActiveConnection_GetPropertyIP4Config_Call) Return(_a0 gonetworkmanager.IP4Config, _a1 error) *MockActiveConnection_GetPropertyIP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyIP4Config_Call) Return(iP4Config gonetworkmanager.IP4Config, err error) *MockActiveConnection_GetPropertyIP4Config_Call { + _c.Call.Return(iP4Config, err) return _c } @@ -517,9 +515,9 @@ func (_c *MockActiveConnection_GetPropertyIP4Config_Call) RunAndReturn(run func( return _c } -// GetPropertyIP6Config provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { - ret := _m.Called() +// GetPropertyIP6Config provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP6Config") @@ -527,23 +525,21 @@ func (_m *MockActiveConnection) GetPropertyIP6Config() (gonetworkmanager.IP6Conf var r0 gonetworkmanager.IP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -564,8 +560,8 @@ func (_c *MockActiveConnection_GetPropertyIP6Config_Call) Run(run func()) *MockA return _c } -func (_c *MockActiveConnection_GetPropertyIP6Config_Call) Return(_a0 gonetworkmanager.IP6Config, _a1 error) *MockActiveConnection_GetPropertyIP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyIP6Config_Call) Return(iP6Config gonetworkmanager.IP6Config, err error) *MockActiveConnection_GetPropertyIP6Config_Call { + _c.Call.Return(iP6Config, err) return _c } @@ -574,9 +570,9 @@ func (_c *MockActiveConnection_GetPropertyIP6Config_Call) RunAndReturn(run func( return _c } -// GetPropertyMaster provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyMaster() (gonetworkmanager.Device, error) { - ret := _m.Called() +// GetPropertyMaster provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyMaster() (gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMaster") @@ -584,23 +580,21 @@ func (_m *MockActiveConnection) GetPropertyMaster() (gonetworkmanager.Device, er var r0 gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -621,8 +615,8 @@ func (_c *MockActiveConnection_GetPropertyMaster_Call) Run(run func()) *MockActi return _c } -func (_c *MockActiveConnection_GetPropertyMaster_Call) Return(_a0 gonetworkmanager.Device, _a1 error) *MockActiveConnection_GetPropertyMaster_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyMaster_Call) Return(device gonetworkmanager.Device, err error) *MockActiveConnection_GetPropertyMaster_Call { + _c.Call.Return(device, err) return _c } @@ -631,9 +625,9 @@ func (_c *MockActiveConnection_GetPropertyMaster_Call) RunAndReturn(run func() ( return _c } -// GetPropertySpecificObject provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertySpecificObject() (gonetworkmanager.AccessPoint, error) { - ret := _m.Called() +// GetPropertySpecificObject provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertySpecificObject() (gonetworkmanager.AccessPoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertySpecificObject") @@ -641,23 +635,21 @@ func (_m *MockActiveConnection) GetPropertySpecificObject() (gonetworkmanager.Ac var r0 gonetworkmanager.AccessPoint var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.AccessPoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.AccessPoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.AccessPoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.AccessPoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.AccessPoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -678,8 +670,8 @@ func (_c *MockActiveConnection_GetPropertySpecificObject_Call) Run(run func()) * return _c } -func (_c *MockActiveConnection_GetPropertySpecificObject_Call) Return(_a0 gonetworkmanager.AccessPoint, _a1 error) *MockActiveConnection_GetPropertySpecificObject_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertySpecificObject_Call) Return(accessPoint gonetworkmanager.AccessPoint, err error) *MockActiveConnection_GetPropertySpecificObject_Call { + _c.Call.Return(accessPoint, err) return _c } @@ -688,9 +680,9 @@ func (_c *MockActiveConnection_GetPropertySpecificObject_Call) RunAndReturn(run return _c } -// GetPropertyState provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyState() (gonetworkmanager.NmActiveConnectionState, error) { - ret := _m.Called() +// GetPropertyState provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyState() (gonetworkmanager.NmActiveConnectionState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyState") @@ -698,21 +690,19 @@ func (_m *MockActiveConnection) GetPropertyState() (gonetworkmanager.NmActiveCon var r0 gonetworkmanager.NmActiveConnectionState var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmActiveConnectionState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmActiveConnectionState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmActiveConnectionState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmActiveConnectionState); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmActiveConnectionState) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -733,8 +723,8 @@ func (_c *MockActiveConnection_GetPropertyState_Call) Run(run func()) *MockActiv return _c } -func (_c *MockActiveConnection_GetPropertyState_Call) Return(_a0 gonetworkmanager.NmActiveConnectionState, _a1 error) *MockActiveConnection_GetPropertyState_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyState_Call) Return(nmActiveConnectionState gonetworkmanager.NmActiveConnectionState, err error) *MockActiveConnection_GetPropertyState_Call { + _c.Call.Return(nmActiveConnectionState, err) return _c } @@ -743,9 +733,9 @@ func (_c *MockActiveConnection_GetPropertyState_Call) RunAndReturn(run func() (g return _c } -// GetPropertyStateFlags provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyStateFlags() (uint32, error) { - ret := _m.Called() +// GetPropertyStateFlags provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyStateFlags() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyStateFlags") @@ -753,21 +743,19 @@ func (_m *MockActiveConnection) GetPropertyStateFlags() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -788,8 +776,8 @@ func (_c *MockActiveConnection_GetPropertyStateFlags_Call) Run(run func()) *Mock return _c } -func (_c *MockActiveConnection_GetPropertyStateFlags_Call) Return(_a0 uint32, _a1 error) *MockActiveConnection_GetPropertyStateFlags_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyStateFlags_Call) Return(v uint32, err error) *MockActiveConnection_GetPropertyStateFlags_Call { + _c.Call.Return(v, err) return _c } @@ -798,9 +786,9 @@ func (_c *MockActiveConnection_GetPropertyStateFlags_Call) RunAndReturn(run func return _c } -// GetPropertyType provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyType() (string, error) { - ret := _m.Called() +// GetPropertyType provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyType() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyType") @@ -808,21 +796,19 @@ func (_m *MockActiveConnection) GetPropertyType() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -843,8 +829,8 @@ func (_c *MockActiveConnection_GetPropertyType_Call) Run(run func()) *MockActive return _c } -func (_c *MockActiveConnection_GetPropertyType_Call) Return(_a0 string, _a1 error) *MockActiveConnection_GetPropertyType_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyType_Call) Return(s string, err error) *MockActiveConnection_GetPropertyType_Call { + _c.Call.Return(s, err) return _c } @@ -853,9 +839,9 @@ func (_c *MockActiveConnection_GetPropertyType_Call) RunAndReturn(run func() (st return _c } -// GetPropertyUUID provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyUUID() (string, error) { - ret := _m.Called() +// GetPropertyUUID provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyUUID() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyUUID") @@ -863,21 +849,19 @@ func (_m *MockActiveConnection) GetPropertyUUID() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -898,8 +882,8 @@ func (_c *MockActiveConnection_GetPropertyUUID_Call) Run(run func()) *MockActive return _c } -func (_c *MockActiveConnection_GetPropertyUUID_Call) Return(_a0 string, _a1 error) *MockActiveConnection_GetPropertyUUID_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyUUID_Call) Return(s string, err error) *MockActiveConnection_GetPropertyUUID_Call { + _c.Call.Return(s, err) return _c } @@ -908,9 +892,9 @@ func (_c *MockActiveConnection_GetPropertyUUID_Call) RunAndReturn(run func() (st return _c } -// GetPropertyVPN provides a mock function with no fields -func (_m *MockActiveConnection) GetPropertyVPN() (bool, error) { - ret := _m.Called() +// GetPropertyVPN provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) GetPropertyVPN() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyVPN") @@ -918,21 +902,19 @@ func (_m *MockActiveConnection) GetPropertyVPN() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -953,8 +935,8 @@ func (_c *MockActiveConnection_GetPropertyVPN_Call) Run(run func()) *MockActiveC return _c } -func (_c *MockActiveConnection_GetPropertyVPN_Call) Return(_a0 bool, _a1 error) *MockActiveConnection_GetPropertyVPN_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockActiveConnection_GetPropertyVPN_Call) Return(b bool, err error) *MockActiveConnection_GetPropertyVPN_Call { + _c.Call.Return(b, err) return _c } @@ -963,21 +945,20 @@ func (_c *MockActiveConnection_GetPropertyVPN_Call) RunAndReturn(run func() (boo return _c } -// SubscribeState provides a mock function with given fields: receiver, exit -func (_m *MockActiveConnection) SubscribeState(receiver chan gonetworkmanager.StateChange, exit chan struct{}) error { - ret := _m.Called(receiver, exit) +// SubscribeState provides a mock function for the type MockActiveConnection +func (_mock *MockActiveConnection) SubscribeState(receiver chan gonetworkmanager.StateChange, exit chan struct{}) error { + ret := _mock.Called(receiver, exit) if len(ret) == 0 { panic("no return value specified for SubscribeState") } var r0 error - if rf, ok := ret.Get(0).(func(chan gonetworkmanager.StateChange, chan struct{}) error); ok { - r0 = rf(receiver, exit) + if returnFunc, ok := ret.Get(0).(func(chan gonetworkmanager.StateChange, chan struct{}) error); ok { + r0 = returnFunc(receiver, exit) } else { r0 = ret.Error(0) } - return r0 } @@ -989,13 +970,24 @@ type MockActiveConnection_SubscribeState_Call struct { // SubscribeState is a helper method to define mock.On call // - receiver chan gonetworkmanager.StateChange // - exit chan struct{} -func (_e *MockActiveConnection_Expecter) SubscribeState(receiver interface{}, exit interface{}) *MockActiveConnection_SubscribeState_Call { +func (_e *MockActiveConnection_Expecter) SubscribeState(receiver any, exit any) *MockActiveConnection_SubscribeState_Call { return &MockActiveConnection_SubscribeState_Call{Call: _e.mock.On("SubscribeState", receiver, exit)} } func (_c *MockActiveConnection_SubscribeState_Call) Run(run func(receiver chan gonetworkmanager.StateChange, exit chan struct{})) *MockActiveConnection_SubscribeState_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(chan gonetworkmanager.StateChange), args[1].(chan struct{})) + var arg0 chan gonetworkmanager.StateChange + if args[0] != nil { + arg0 = args[0].(chan gonetworkmanager.StateChange) + } + var arg1 chan struct{} + if args[1] != nil { + arg1 = args[1].(chan struct{}) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1005,21 +997,7 @@ func (_c *MockActiveConnection_SubscribeState_Call) Return(err error) *MockActiv return _c } -func (_c *MockActiveConnection_SubscribeState_Call) RunAndReturn(run func(chan gonetworkmanager.StateChange, chan struct{}) error) *MockActiveConnection_SubscribeState_Call { +func (_c *MockActiveConnection_SubscribeState_Call) RunAndReturn(run func(receiver chan gonetworkmanager.StateChange, exit chan struct{}) error) *MockActiveConnection_SubscribeState_Call { _c.Call.Return(run) return _c } - -// NewMockActiveConnection creates a new instance of MockActiveConnection. 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 NewMockActiveConnection(t interface { - mock.TestingT - Cleanup(func()) -}) *MockActiveConnection { - mock := &MockActiveConnection{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Connection.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Connection.go index 84f59e1c..c14fdda9 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Connection.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Connection.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockConnection creates a new instance of MockConnection. 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 NewMockConnection(t interface { + mock.TestingT + Cleanup(func()) +}) *MockConnection { + mock := &MockConnection{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockConnection is an autogenerated mock type for the Connection type type MockConnection struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *MockConnection) EXPECT() *MockConnection_Expecter { return &MockConnection_Expecter{mock: &_m.Mock} } -// ClearSecrets provides a mock function with no fields -func (_m *MockConnection) ClearSecrets() error { - ret := _m.Called() +// ClearSecrets provides a mock function for the type MockConnection +func (_mock *MockConnection) ClearSecrets() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ClearSecrets") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -57,8 +71,8 @@ func (_c *MockConnection_ClearSecrets_Call) Run(run func()) *MockConnection_Clea return _c } -func (_c *MockConnection_ClearSecrets_Call) Return(_a0 error) *MockConnection_ClearSecrets_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_ClearSecrets_Call) Return(err error) *MockConnection_ClearSecrets_Call { + _c.Call.Return(err) return _c } @@ -67,21 +81,20 @@ func (_c *MockConnection_ClearSecrets_Call) RunAndReturn(run func() error) *Mock return _c } -// Delete provides a mock function with no fields -func (_m *MockConnection) Delete() error { - ret := _m.Called() +// Delete provides a mock function for the type MockConnection +func (_mock *MockConnection) Delete() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -102,8 +115,8 @@ func (_c *MockConnection_Delete_Call) Run(run func()) *MockConnection_Delete_Cal return _c } -func (_c *MockConnection_Delete_Call) Return(_a0 error) *MockConnection_Delete_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_Delete_Call) Return(err error) *MockConnection_Delete_Call { + _c.Call.Return(err) return _c } @@ -112,21 +125,20 @@ func (_c *MockConnection_Delete_Call) RunAndReturn(run func() error) *MockConnec return _c } -// GetPath provides a mock function with no fields -func (_m *MockConnection) GetPath() dbus.ObjectPath { - ret := _m.Called() +// GetPath provides a mock function for the type MockConnection +func (_mock *MockConnection) GetPath() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPath") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -147,8 +159,8 @@ func (_c *MockConnection_GetPath_Call) Run(run func()) *MockConnection_GetPath_C return _c } -func (_c *MockConnection_GetPath_Call) Return(_a0 dbus.ObjectPath) *MockConnection_GetPath_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockConnection_GetPath_Call { + _c.Call.Return(objectPath) return _c } @@ -157,9 +169,9 @@ func (_c *MockConnection_GetPath_Call) RunAndReturn(run func() dbus.ObjectPath) return _c } -// GetPropertyFilename provides a mock function with no fields -func (_m *MockConnection) GetPropertyFilename() (string, error) { - ret := _m.Called() +// GetPropertyFilename provides a mock function for the type MockConnection +func (_mock *MockConnection) GetPropertyFilename() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFilename") @@ -167,21 +179,19 @@ func (_m *MockConnection) GetPropertyFilename() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -202,8 +212,8 @@ func (_c *MockConnection_GetPropertyFilename_Call) Run(run func()) *MockConnecti return _c } -func (_c *MockConnection_GetPropertyFilename_Call) Return(_a0 string, _a1 error) *MockConnection_GetPropertyFilename_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_GetPropertyFilename_Call) Return(s string, err error) *MockConnection_GetPropertyFilename_Call { + _c.Call.Return(s, err) return _c } @@ -212,9 +222,9 @@ func (_c *MockConnection_GetPropertyFilename_Call) RunAndReturn(run func() (stri return _c } -// GetPropertyFlags provides a mock function with no fields -func (_m *MockConnection) GetPropertyFlags() (uint32, error) { - ret := _m.Called() +// GetPropertyFlags provides a mock function for the type MockConnection +func (_mock *MockConnection) GetPropertyFlags() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFlags") @@ -222,21 +232,19 @@ func (_m *MockConnection) GetPropertyFlags() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -257,8 +265,8 @@ func (_c *MockConnection_GetPropertyFlags_Call) Run(run func()) *MockConnection_ return _c } -func (_c *MockConnection_GetPropertyFlags_Call) Return(_a0 uint32, _a1 error) *MockConnection_GetPropertyFlags_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_GetPropertyFlags_Call) Return(v uint32, err error) *MockConnection_GetPropertyFlags_Call { + _c.Call.Return(v, err) return _c } @@ -267,9 +275,9 @@ func (_c *MockConnection_GetPropertyFlags_Call) RunAndReturn(run func() (uint32, return _c } -// GetPropertyUnsaved provides a mock function with no fields -func (_m *MockConnection) GetPropertyUnsaved() (bool, error) { - ret := _m.Called() +// GetPropertyUnsaved provides a mock function for the type MockConnection +func (_mock *MockConnection) GetPropertyUnsaved() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyUnsaved") @@ -277,21 +285,19 @@ func (_m *MockConnection) GetPropertyUnsaved() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -312,8 +318,8 @@ func (_c *MockConnection_GetPropertyUnsaved_Call) Run(run func()) *MockConnectio return _c } -func (_c *MockConnection_GetPropertyUnsaved_Call) Return(_a0 bool, _a1 error) *MockConnection_GetPropertyUnsaved_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_GetPropertyUnsaved_Call) Return(b bool, err error) *MockConnection_GetPropertyUnsaved_Call { + _c.Call.Return(b, err) return _c } @@ -322,9 +328,9 @@ func (_c *MockConnection_GetPropertyUnsaved_Call) RunAndReturn(run func() (bool, return _c } -// GetSecrets provides a mock function with given fields: settingName -func (_m *MockConnection) GetSecrets(settingName string) (gonetworkmanager.ConnectionSettings, error) { - ret := _m.Called(settingName) +// GetSecrets provides a mock function for the type MockConnection +func (_mock *MockConnection) GetSecrets(settingName string) (gonetworkmanager.ConnectionSettings, error) { + ret := _mock.Called(settingName) if len(ret) == 0 { panic("no return value specified for GetSecrets") @@ -332,23 +338,21 @@ func (_m *MockConnection) GetSecrets(settingName string) (gonetworkmanager.Conne var r0 gonetworkmanager.ConnectionSettings var r1 error - if rf, ok := ret.Get(0).(func(string) (gonetworkmanager.ConnectionSettings, error)); ok { - return rf(settingName) + if returnFunc, ok := ret.Get(0).(func(string) (gonetworkmanager.ConnectionSettings, error)); ok { + return returnFunc(settingName) } - if rf, ok := ret.Get(0).(func(string) gonetworkmanager.ConnectionSettings); ok { - r0 = rf(settingName) + if returnFunc, ok := ret.Get(0).(func(string) gonetworkmanager.ConnectionSettings); ok { + r0 = returnFunc(settingName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ConnectionSettings) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(settingName) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(settingName) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -359,30 +363,36 @@ type MockConnection_GetSecrets_Call struct { // GetSecrets is a helper method to define mock.On call // - settingName string -func (_e *MockConnection_Expecter) GetSecrets(settingName interface{}) *MockConnection_GetSecrets_Call { +func (_e *MockConnection_Expecter) GetSecrets(settingName any) *MockConnection_GetSecrets_Call { return &MockConnection_GetSecrets_Call{Call: _e.mock.On("GetSecrets", settingName)} } func (_c *MockConnection_GetSecrets_Call) Run(run func(settingName string)) *MockConnection_GetSecrets_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockConnection_GetSecrets_Call) Return(_a0 gonetworkmanager.ConnectionSettings, _a1 error) *MockConnection_GetSecrets_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_GetSecrets_Call) Return(connectionSettings gonetworkmanager.ConnectionSettings, err error) *MockConnection_GetSecrets_Call { + _c.Call.Return(connectionSettings, err) return _c } -func (_c *MockConnection_GetSecrets_Call) RunAndReturn(run func(string) (gonetworkmanager.ConnectionSettings, error)) *MockConnection_GetSecrets_Call { +func (_c *MockConnection_GetSecrets_Call) RunAndReturn(run func(settingName string) (gonetworkmanager.ConnectionSettings, error)) *MockConnection_GetSecrets_Call { _c.Call.Return(run) return _c } -// GetSettings provides a mock function with no fields -func (_m *MockConnection) GetSettings() (gonetworkmanager.ConnectionSettings, error) { - ret := _m.Called() +// GetSettings provides a mock function for the type MockConnection +func (_mock *MockConnection) GetSettings() (gonetworkmanager.ConnectionSettings, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetSettings") @@ -390,23 +400,21 @@ func (_m *MockConnection) GetSettings() (gonetworkmanager.ConnectionSettings, er var r0 gonetworkmanager.ConnectionSettings var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.ConnectionSettings, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ConnectionSettings, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.ConnectionSettings); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ConnectionSettings); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ConnectionSettings) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -427,8 +435,8 @@ func (_c *MockConnection_GetSettings_Call) Run(run func()) *MockConnection_GetSe return _c } -func (_c *MockConnection_GetSettings_Call) Return(_a0 gonetworkmanager.ConnectionSettings, _a1 error) *MockConnection_GetSettings_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_GetSettings_Call) Return(connectionSettings gonetworkmanager.ConnectionSettings, err error) *MockConnection_GetSettings_Call { + _c.Call.Return(connectionSettings, err) return _c } @@ -437,9 +445,9 @@ func (_c *MockConnection_GetSettings_Call) RunAndReturn(run func() (gonetworkman return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockConnection) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockConnection +func (_mock *MockConnection) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -447,23 +455,21 @@ func (_m *MockConnection) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -484,8 +490,8 @@ func (_c *MockConnection_MarshalJSON_Call) Run(run func()) *MockConnection_Marsh return _c } -func (_c *MockConnection_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockConnection_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockConnection_MarshalJSON_Call) Return(bytes []byte, err error) *MockConnection_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -494,21 +500,20 @@ func (_c *MockConnection_MarshalJSON_Call) RunAndReturn(run func() ([]byte, erro return _c } -// Save provides a mock function with no fields -func (_m *MockConnection) Save() error { - ret := _m.Called() +// Save provides a mock function for the type MockConnection +func (_mock *MockConnection) Save() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Save") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -529,8 +534,8 @@ func (_c *MockConnection_Save_Call) Run(run func()) *MockConnection_Save_Call { return _c } -func (_c *MockConnection_Save_Call) Return(_a0 error) *MockConnection_Save_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_Save_Call) Return(err error) *MockConnection_Save_Call { + _c.Call.Return(err) return _c } @@ -539,21 +544,20 @@ func (_c *MockConnection_Save_Call) RunAndReturn(run func() error) *MockConnecti return _c } -// Update provides a mock function with given fields: settings -func (_m *MockConnection) Update(settings gonetworkmanager.ConnectionSettings) error { - ret := _m.Called(settings) +// Update provides a mock function for the type MockConnection +func (_mock *MockConnection) Update(settings gonetworkmanager.ConnectionSettings) error { + ret := _mock.Called(settings) if len(ret) == 0 { panic("no return value specified for Update") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok { - r0 = rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok { + r0 = returnFunc(settings) } else { r0 = ret.Error(0) } - return r0 } @@ -564,42 +568,47 @@ type MockConnection_Update_Call struct { // Update is a helper method to define mock.On call // - settings gonetworkmanager.ConnectionSettings -func (_e *MockConnection_Expecter) Update(settings interface{}) *MockConnection_Update_Call { +func (_e *MockConnection_Expecter) Update(settings any) *MockConnection_Update_Call { return &MockConnection_Update_Call{Call: _e.mock.On("Update", settings)} } func (_c *MockConnection_Update_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockConnection_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.ConnectionSettings)) + var arg0 gonetworkmanager.ConnectionSettings + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.ConnectionSettings) + } + run( + arg0, + ) }) return _c } -func (_c *MockConnection_Update_Call) Return(_a0 error) *MockConnection_Update_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_Update_Call) Return(err error) *MockConnection_Update_Call { + _c.Call.Return(err) return _c } -func (_c *MockConnection_Update_Call) RunAndReturn(run func(gonetworkmanager.ConnectionSettings) error) *MockConnection_Update_Call { +func (_c *MockConnection_Update_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) error) *MockConnection_Update_Call { _c.Call.Return(run) return _c } -// UpdateUnsaved provides a mock function with given fields: settings -func (_m *MockConnection) UpdateUnsaved(settings gonetworkmanager.ConnectionSettings) error { - ret := _m.Called(settings) +// UpdateUnsaved provides a mock function for the type MockConnection +func (_mock *MockConnection) UpdateUnsaved(settings gonetworkmanager.ConnectionSettings) error { + ret := _mock.Called(settings) if len(ret) == 0 { panic("no return value specified for UpdateUnsaved") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok { - r0 = rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok { + r0 = returnFunc(settings) } else { r0 = ret.Error(0) } - return r0 } @@ -610,37 +619,29 @@ type MockConnection_UpdateUnsaved_Call struct { // UpdateUnsaved is a helper method to define mock.On call // - settings gonetworkmanager.ConnectionSettings -func (_e *MockConnection_Expecter) UpdateUnsaved(settings interface{}) *MockConnection_UpdateUnsaved_Call { +func (_e *MockConnection_Expecter) UpdateUnsaved(settings any) *MockConnection_UpdateUnsaved_Call { return &MockConnection_UpdateUnsaved_Call{Call: _e.mock.On("UpdateUnsaved", settings)} } func (_c *MockConnection_UpdateUnsaved_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockConnection_UpdateUnsaved_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.ConnectionSettings)) + var arg0 gonetworkmanager.ConnectionSettings + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.ConnectionSettings) + } + run( + arg0, + ) }) return _c } -func (_c *MockConnection_UpdateUnsaved_Call) Return(_a0 error) *MockConnection_UpdateUnsaved_Call { - _c.Call.Return(_a0) +func (_c *MockConnection_UpdateUnsaved_Call) Return(err error) *MockConnection_UpdateUnsaved_Call { + _c.Call.Return(err) return _c } -func (_c *MockConnection_UpdateUnsaved_Call) RunAndReturn(run func(gonetworkmanager.ConnectionSettings) error) *MockConnection_UpdateUnsaved_Call { +func (_c *MockConnection_UpdateUnsaved_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) error) *MockConnection_UpdateUnsaved_Call { _c.Call.Return(run) return _c } - -// NewMockConnection creates a new instance of MockConnection. 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 NewMockConnection(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConnection { - mock := &MockConnection{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Device.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Device.go index b2fc0b52..119500cd 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Device.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Device.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockDevice creates a new instance of MockDevice. 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 NewMockDevice(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDevice { + mock := &MockDevice{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockDevice is an autogenerated mock type for the Device type type MockDevice struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *MockDevice) EXPECT() *MockDevice_Expecter { return &MockDevice_Expecter{mock: &_m.Mock} } -// Delete provides a mock function with no fields -func (_m *MockDevice) Delete() error { - ret := _m.Called() +// Delete provides a mock function for the type MockDevice +func (_mock *MockDevice) Delete() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -57,8 +71,8 @@ func (_c *MockDevice_Delete_Call) Run(run func()) *MockDevice_Delete_Call { return _c } -func (_c *MockDevice_Delete_Call) Return(_a0 error) *MockDevice_Delete_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_Delete_Call) Return(err error) *MockDevice_Delete_Call { + _c.Call.Return(err) return _c } @@ -67,21 +81,20 @@ func (_c *MockDevice_Delete_Call) RunAndReturn(run func() error) *MockDevice_Del return _c } -// Disconnect provides a mock function with no fields -func (_m *MockDevice) Disconnect() error { - ret := _m.Called() +// Disconnect provides a mock function for the type MockDevice +func (_mock *MockDevice) Disconnect() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Disconnect") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -102,8 +115,8 @@ func (_c *MockDevice_Disconnect_Call) Run(run func()) *MockDevice_Disconnect_Cal return _c } -func (_c *MockDevice_Disconnect_Call) Return(_a0 error) *MockDevice_Disconnect_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_Disconnect_Call) Return(err error) *MockDevice_Disconnect_Call { + _c.Call.Return(err) return _c } @@ -112,21 +125,20 @@ func (_c *MockDevice_Disconnect_Call) RunAndReturn(run func() error) *MockDevice return _c } -// GetPath provides a mock function with no fields -func (_m *MockDevice) GetPath() dbus.ObjectPath { - ret := _m.Called() +// GetPath provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPath() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPath") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -147,8 +159,8 @@ func (_c *MockDevice_GetPath_Call) Run(run func()) *MockDevice_GetPath_Call { return _c } -func (_c *MockDevice_GetPath_Call) Return(_a0 dbus.ObjectPath) *MockDevice_GetPath_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockDevice_GetPath_Call { + _c.Call.Return(objectPath) return _c } @@ -157,9 +169,9 @@ func (_c *MockDevice_GetPath_Call) RunAndReturn(run func() dbus.ObjectPath) *Moc return _c } -// GetPropertyActiveConnection provides a mock function with no fields -func (_m *MockDevice) GetPropertyActiveConnection() (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called() +// GetPropertyActiveConnection provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyActiveConnection() (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyActiveConnection") @@ -167,23 +179,21 @@ func (_m *MockDevice) GetPropertyActiveConnection() (gonetworkmanager.ActiveConn var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -204,8 +214,8 @@ func (_c *MockDevice_GetPropertyActiveConnection_Call) Run(run func()) *MockDevi return _c } -func (_c *MockDevice_GetPropertyActiveConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockDevice_GetPropertyActiveConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyActiveConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockDevice_GetPropertyActiveConnection_Call { + _c.Call.Return(activeConnection, err) return _c } @@ -214,9 +224,9 @@ func (_c *MockDevice_GetPropertyActiveConnection_Call) RunAndReturn(run func() ( return _c } -// GetPropertyAutoConnect provides a mock function with no fields -func (_m *MockDevice) GetPropertyAutoConnect() (bool, error) { - ret := _m.Called() +// GetPropertyAutoConnect provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyAutoConnect() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAutoConnect") @@ -224,21 +234,19 @@ func (_m *MockDevice) GetPropertyAutoConnect() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -259,8 +267,8 @@ func (_c *MockDevice_GetPropertyAutoConnect_Call) Run(run func()) *MockDevice_Ge return _c } -func (_c *MockDevice_GetPropertyAutoConnect_Call) Return(_a0 bool, _a1 error) *MockDevice_GetPropertyAutoConnect_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyAutoConnect_Call) Return(b bool, err error) *MockDevice_GetPropertyAutoConnect_Call { + _c.Call.Return(b, err) return _c } @@ -269,9 +277,9 @@ func (_c *MockDevice_GetPropertyAutoConnect_Call) RunAndReturn(run func() (bool, return _c } -// GetPropertyAvailableConnections provides a mock function with no fields -func (_m *MockDevice) GetPropertyAvailableConnections() ([]gonetworkmanager.Connection, error) { - ret := _m.Called() +// GetPropertyAvailableConnections provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyAvailableConnections() ([]gonetworkmanager.Connection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAvailableConnections") @@ -279,23 +287,21 @@ func (_m *MockDevice) GetPropertyAvailableConnections() ([]gonetworkmanager.Conn var r0 []gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -316,8 +322,8 @@ func (_c *MockDevice_GetPropertyAvailableConnections_Call) Run(run func()) *Mock return _c } -func (_c *MockDevice_GetPropertyAvailableConnections_Call) Return(_a0 []gonetworkmanager.Connection, _a1 error) *MockDevice_GetPropertyAvailableConnections_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyAvailableConnections_Call) Return(connections []gonetworkmanager.Connection, err error) *MockDevice_GetPropertyAvailableConnections_Call { + _c.Call.Return(connections, err) return _c } @@ -326,9 +332,9 @@ func (_c *MockDevice_GetPropertyAvailableConnections_Call) RunAndReturn(run func return _c } -// GetPropertyDHCP4Config provides a mock function with no fields -func (_m *MockDevice) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { - ret := _m.Called() +// GetPropertyDHCP4Config provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP4Config") @@ -336,23 +342,21 @@ func (_m *MockDevice) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, er var r0 gonetworkmanager.DHCP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -373,8 +377,8 @@ func (_c *MockDevice_GetPropertyDHCP4Config_Call) Run(run func()) *MockDevice_Ge return _c } -func (_c *MockDevice_GetPropertyDHCP4Config_Call) Return(_a0 gonetworkmanager.DHCP4Config, _a1 error) *MockDevice_GetPropertyDHCP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyDHCP4Config_Call) Return(dHCP4Config gonetworkmanager.DHCP4Config, err error) *MockDevice_GetPropertyDHCP4Config_Call { + _c.Call.Return(dHCP4Config, err) return _c } @@ -383,9 +387,9 @@ func (_c *MockDevice_GetPropertyDHCP4Config_Call) RunAndReturn(run func() (gonet return _c } -// GetPropertyDHCP6Config provides a mock function with no fields -func (_m *MockDevice) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { - ret := _m.Called() +// GetPropertyDHCP6Config provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP6Config") @@ -393,23 +397,21 @@ func (_m *MockDevice) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, er var r0 gonetworkmanager.DHCP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -430,8 +432,8 @@ func (_c *MockDevice_GetPropertyDHCP6Config_Call) Run(run func()) *MockDevice_Ge return _c } -func (_c *MockDevice_GetPropertyDHCP6Config_Call) Return(_a0 gonetworkmanager.DHCP6Config, _a1 error) *MockDevice_GetPropertyDHCP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyDHCP6Config_Call) Return(dHCP6Config gonetworkmanager.DHCP6Config, err error) *MockDevice_GetPropertyDHCP6Config_Call { + _c.Call.Return(dHCP6Config, err) return _c } @@ -440,9 +442,9 @@ func (_c *MockDevice_GetPropertyDHCP6Config_Call) RunAndReturn(run func() (gonet return _c } -// GetPropertyDeviceType provides a mock function with no fields -func (_m *MockDevice) GetPropertyDeviceType() (gonetworkmanager.NmDeviceType, error) { - ret := _m.Called() +// GetPropertyDeviceType provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyDeviceType() (gonetworkmanager.NmDeviceType, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDeviceType") @@ -450,21 +452,19 @@ func (_m *MockDevice) GetPropertyDeviceType() (gonetworkmanager.NmDeviceType, er var r0 gonetworkmanager.NmDeviceType var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceType, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceType, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceType); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceType); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmDeviceType) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -485,8 +485,8 @@ func (_c *MockDevice_GetPropertyDeviceType_Call) Run(run func()) *MockDevice_Get return _c } -func (_c *MockDevice_GetPropertyDeviceType_Call) Return(_a0 gonetworkmanager.NmDeviceType, _a1 error) *MockDevice_GetPropertyDeviceType_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyDeviceType_Call) Return(nmDeviceType gonetworkmanager.NmDeviceType, err error) *MockDevice_GetPropertyDeviceType_Call { + _c.Call.Return(nmDeviceType, err) return _c } @@ -495,9 +495,9 @@ func (_c *MockDevice_GetPropertyDeviceType_Call) RunAndReturn(run func() (gonetw return _c } -// GetPropertyDriver provides a mock function with no fields -func (_m *MockDevice) GetPropertyDriver() (string, error) { - ret := _m.Called() +// GetPropertyDriver provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyDriver() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDriver") @@ -505,21 +505,19 @@ func (_m *MockDevice) GetPropertyDriver() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -540,8 +538,8 @@ func (_c *MockDevice_GetPropertyDriver_Call) Run(run func()) *MockDevice_GetProp return _c } -func (_c *MockDevice_GetPropertyDriver_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyDriver_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyDriver_Call) Return(s string, err error) *MockDevice_GetPropertyDriver_Call { + _c.Call.Return(s, err) return _c } @@ -550,9 +548,9 @@ func (_c *MockDevice_GetPropertyDriver_Call) RunAndReturn(run func() (string, er return _c } -// GetPropertyDriverVersion provides a mock function with no fields -func (_m *MockDevice) GetPropertyDriverVersion() (string, error) { - ret := _m.Called() +// GetPropertyDriverVersion provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyDriverVersion() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDriverVersion") @@ -560,21 +558,19 @@ func (_m *MockDevice) GetPropertyDriverVersion() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -595,8 +591,8 @@ func (_c *MockDevice_GetPropertyDriverVersion_Call) Run(run func()) *MockDevice_ return _c } -func (_c *MockDevice_GetPropertyDriverVersion_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyDriverVersion_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyDriverVersion_Call) Return(s string, err error) *MockDevice_GetPropertyDriverVersion_Call { + _c.Call.Return(s, err) return _c } @@ -605,9 +601,9 @@ func (_c *MockDevice_GetPropertyDriverVersion_Call) RunAndReturn(run func() (str return _c } -// GetPropertyFirmwareMissing provides a mock function with no fields -func (_m *MockDevice) GetPropertyFirmwareMissing() (bool, error) { - ret := _m.Called() +// GetPropertyFirmwareMissing provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyFirmwareMissing() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFirmwareMissing") @@ -615,21 +611,19 @@ func (_m *MockDevice) GetPropertyFirmwareMissing() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -650,8 +644,8 @@ func (_c *MockDevice_GetPropertyFirmwareMissing_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDevice_GetPropertyFirmwareMissing_Call) Return(_a0 bool, _a1 error) *MockDevice_GetPropertyFirmwareMissing_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyFirmwareMissing_Call) Return(b bool, err error) *MockDevice_GetPropertyFirmwareMissing_Call { + _c.Call.Return(b, err) return _c } @@ -660,9 +654,9 @@ func (_c *MockDevice_GetPropertyFirmwareMissing_Call) RunAndReturn(run func() (b return _c } -// GetPropertyFirmwareVersion provides a mock function with no fields -func (_m *MockDevice) GetPropertyFirmwareVersion() (string, error) { - ret := _m.Called() +// GetPropertyFirmwareVersion provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyFirmwareVersion() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFirmwareVersion") @@ -670,21 +664,19 @@ func (_m *MockDevice) GetPropertyFirmwareVersion() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -705,8 +697,8 @@ func (_c *MockDevice_GetPropertyFirmwareVersion_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDevice_GetPropertyFirmwareVersion_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyFirmwareVersion_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyFirmwareVersion_Call) Return(s string, err error) *MockDevice_GetPropertyFirmwareVersion_Call { + _c.Call.Return(s, err) return _c } @@ -715,9 +707,9 @@ func (_c *MockDevice_GetPropertyFirmwareVersion_Call) RunAndReturn(run func() (s return _c } -// GetPropertyIP4Config provides a mock function with no fields -func (_m *MockDevice) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { - ret := _m.Called() +// GetPropertyIP4Config provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP4Config") @@ -725,23 +717,21 @@ func (_m *MockDevice) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) var r0 gonetworkmanager.IP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -762,8 +752,8 @@ func (_c *MockDevice_GetPropertyIP4Config_Call) Run(run func()) *MockDevice_GetP return _c } -func (_c *MockDevice_GetPropertyIP4Config_Call) Return(_a0 gonetworkmanager.IP4Config, _a1 error) *MockDevice_GetPropertyIP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyIP4Config_Call) Return(iP4Config gonetworkmanager.IP4Config, err error) *MockDevice_GetPropertyIP4Config_Call { + _c.Call.Return(iP4Config, err) return _c } @@ -772,9 +762,9 @@ func (_c *MockDevice_GetPropertyIP4Config_Call) RunAndReturn(run func() (gonetwo return _c } -// GetPropertyIP6Config provides a mock function with no fields -func (_m *MockDevice) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { - ret := _m.Called() +// GetPropertyIP6Config provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP6Config") @@ -782,23 +772,21 @@ func (_m *MockDevice) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) var r0 gonetworkmanager.IP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -819,8 +807,8 @@ func (_c *MockDevice_GetPropertyIP6Config_Call) Run(run func()) *MockDevice_GetP return _c } -func (_c *MockDevice_GetPropertyIP6Config_Call) Return(_a0 gonetworkmanager.IP6Config, _a1 error) *MockDevice_GetPropertyIP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyIP6Config_Call) Return(iP6Config gonetworkmanager.IP6Config, err error) *MockDevice_GetPropertyIP6Config_Call { + _c.Call.Return(iP6Config, err) return _c } @@ -829,9 +817,9 @@ func (_c *MockDevice_GetPropertyIP6Config_Call) RunAndReturn(run func() (gonetwo return _c } -// GetPropertyInterface provides a mock function with no fields -func (_m *MockDevice) GetPropertyInterface() (string, error) { - ret := _m.Called() +// GetPropertyInterface provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyInterface() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyInterface") @@ -839,21 +827,19 @@ func (_m *MockDevice) GetPropertyInterface() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -874,8 +860,8 @@ func (_c *MockDevice_GetPropertyInterface_Call) Run(run func()) *MockDevice_GetP return _c } -func (_c *MockDevice_GetPropertyInterface_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyInterface_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyInterface_Call) Return(s string, err error) *MockDevice_GetPropertyInterface_Call { + _c.Call.Return(s, err) return _c } @@ -884,9 +870,9 @@ func (_c *MockDevice_GetPropertyInterface_Call) RunAndReturn(run func() (string, return _c } -// GetPropertyIp4Connectivity provides a mock function with no fields -func (_m *MockDevice) GetPropertyIp4Connectivity() (gonetworkmanager.NmConnectivity, error) { - ret := _m.Called() +// GetPropertyIp4Connectivity provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyIp4Connectivity() (gonetworkmanager.NmConnectivity, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIp4Connectivity") @@ -894,21 +880,19 @@ func (_m *MockDevice) GetPropertyIp4Connectivity() (gonetworkmanager.NmConnectiv var r0 gonetworkmanager.NmConnectivity var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmConnectivity) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -929,8 +913,8 @@ func (_c *MockDevice_GetPropertyIp4Connectivity_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDevice_GetPropertyIp4Connectivity_Call) Return(_a0 gonetworkmanager.NmConnectivity, _a1 error) *MockDevice_GetPropertyIp4Connectivity_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyIp4Connectivity_Call) Return(nmConnectivity gonetworkmanager.NmConnectivity, err error) *MockDevice_GetPropertyIp4Connectivity_Call { + _c.Call.Return(nmConnectivity, err) return _c } @@ -939,9 +923,9 @@ func (_c *MockDevice_GetPropertyIp4Connectivity_Call) RunAndReturn(run func() (g return _c } -// GetPropertyIpInterface provides a mock function with no fields -func (_m *MockDevice) GetPropertyIpInterface() (string, error) { - ret := _m.Called() +// GetPropertyIpInterface provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyIpInterface() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIpInterface") @@ -949,21 +933,19 @@ func (_m *MockDevice) GetPropertyIpInterface() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -984,8 +966,8 @@ func (_c *MockDevice_GetPropertyIpInterface_Call) Run(run func()) *MockDevice_Ge return _c } -func (_c *MockDevice_GetPropertyIpInterface_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyIpInterface_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyIpInterface_Call) Return(s string, err error) *MockDevice_GetPropertyIpInterface_Call { + _c.Call.Return(s, err) return _c } @@ -994,9 +976,9 @@ func (_c *MockDevice_GetPropertyIpInterface_Call) RunAndReturn(run func() (strin return _c } -// GetPropertyManaged provides a mock function with no fields -func (_m *MockDevice) GetPropertyManaged() (bool, error) { - ret := _m.Called() +// GetPropertyManaged provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyManaged() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyManaged") @@ -1004,21 +986,19 @@ func (_m *MockDevice) GetPropertyManaged() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1039,8 +1019,8 @@ func (_c *MockDevice_GetPropertyManaged_Call) Run(run func()) *MockDevice_GetPro return _c } -func (_c *MockDevice_GetPropertyManaged_Call) Return(_a0 bool, _a1 error) *MockDevice_GetPropertyManaged_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyManaged_Call) Return(b bool, err error) *MockDevice_GetPropertyManaged_Call { + _c.Call.Return(b, err) return _c } @@ -1049,9 +1029,9 @@ func (_c *MockDevice_GetPropertyManaged_Call) RunAndReturn(run func() (bool, err return _c } -// GetPropertyMtu provides a mock function with no fields -func (_m *MockDevice) GetPropertyMtu() (uint32, error) { - ret := _m.Called() +// GetPropertyMtu provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyMtu() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMtu") @@ -1059,21 +1039,19 @@ func (_m *MockDevice) GetPropertyMtu() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1094,8 +1072,8 @@ func (_c *MockDevice_GetPropertyMtu_Call) Run(run func()) *MockDevice_GetPropert return _c } -func (_c *MockDevice_GetPropertyMtu_Call) Return(_a0 uint32, _a1 error) *MockDevice_GetPropertyMtu_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyMtu_Call) Return(v uint32, err error) *MockDevice_GetPropertyMtu_Call { + _c.Call.Return(v, err) return _c } @@ -1104,9 +1082,9 @@ func (_c *MockDevice_GetPropertyMtu_Call) RunAndReturn(run func() (uint32, error return _c } -// GetPropertyNmPluginMissing provides a mock function with no fields -func (_m *MockDevice) GetPropertyNmPluginMissing() (bool, error) { - ret := _m.Called() +// GetPropertyNmPluginMissing provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyNmPluginMissing() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyNmPluginMissing") @@ -1114,21 +1092,19 @@ func (_m *MockDevice) GetPropertyNmPluginMissing() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1149,8 +1125,8 @@ func (_c *MockDevice_GetPropertyNmPluginMissing_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDevice_GetPropertyNmPluginMissing_Call) Return(_a0 bool, _a1 error) *MockDevice_GetPropertyNmPluginMissing_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyNmPluginMissing_Call) Return(b bool, err error) *MockDevice_GetPropertyNmPluginMissing_Call { + _c.Call.Return(b, err) return _c } @@ -1159,9 +1135,9 @@ func (_c *MockDevice_GetPropertyNmPluginMissing_Call) RunAndReturn(run func() (b return _c } -// GetPropertyPhysicalPortId provides a mock function with no fields -func (_m *MockDevice) GetPropertyPhysicalPortId() (string, error) { - ret := _m.Called() +// GetPropertyPhysicalPortId provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyPhysicalPortId() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyPhysicalPortId") @@ -1169,21 +1145,19 @@ func (_m *MockDevice) GetPropertyPhysicalPortId() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1204,8 +1178,8 @@ func (_c *MockDevice_GetPropertyPhysicalPortId_Call) Run(run func()) *MockDevice return _c } -func (_c *MockDevice_GetPropertyPhysicalPortId_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyPhysicalPortId_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyPhysicalPortId_Call) Return(s string, err error) *MockDevice_GetPropertyPhysicalPortId_Call { + _c.Call.Return(s, err) return _c } @@ -1214,9 +1188,9 @@ func (_c *MockDevice_GetPropertyPhysicalPortId_Call) RunAndReturn(run func() (st return _c } -// GetPropertyReal provides a mock function with no fields -func (_m *MockDevice) GetPropertyReal() (bool, error) { - ret := _m.Called() +// GetPropertyReal provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyReal() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyReal") @@ -1224,21 +1198,19 @@ func (_m *MockDevice) GetPropertyReal() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1259,8 +1231,8 @@ func (_c *MockDevice_GetPropertyReal_Call) Run(run func()) *MockDevice_GetProper return _c } -func (_c *MockDevice_GetPropertyReal_Call) Return(_a0 bool, _a1 error) *MockDevice_GetPropertyReal_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyReal_Call) Return(b bool, err error) *MockDevice_GetPropertyReal_Call { + _c.Call.Return(b, err) return _c } @@ -1269,9 +1241,9 @@ func (_c *MockDevice_GetPropertyReal_Call) RunAndReturn(run func() (bool, error) return _c } -// GetPropertyState provides a mock function with no fields -func (_m *MockDevice) GetPropertyState() (gonetworkmanager.NmDeviceState, error) { - ret := _m.Called() +// GetPropertyState provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyState() (gonetworkmanager.NmDeviceState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyState") @@ -1279,21 +1251,19 @@ func (_m *MockDevice) GetPropertyState() (gonetworkmanager.NmDeviceState, error) var r0 gonetworkmanager.NmDeviceState var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceState); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmDeviceState) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1314,8 +1284,8 @@ func (_c *MockDevice_GetPropertyState_Call) Run(run func()) *MockDevice_GetPrope return _c } -func (_c *MockDevice_GetPropertyState_Call) Return(_a0 gonetworkmanager.NmDeviceState, _a1 error) *MockDevice_GetPropertyState_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyState_Call) Return(nmDeviceState gonetworkmanager.NmDeviceState, err error) *MockDevice_GetPropertyState_Call { + _c.Call.Return(nmDeviceState, err) return _c } @@ -1324,9 +1294,9 @@ func (_c *MockDevice_GetPropertyState_Call) RunAndReturn(run func() (gonetworkma return _c } -// GetPropertyUdi provides a mock function with no fields -func (_m *MockDevice) GetPropertyUdi() (string, error) { - ret := _m.Called() +// GetPropertyUdi provides a mock function for the type MockDevice +func (_mock *MockDevice) GetPropertyUdi() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyUdi") @@ -1334,21 +1304,19 @@ func (_m *MockDevice) GetPropertyUdi() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1369,8 +1337,8 @@ func (_c *MockDevice_GetPropertyUdi_Call) Run(run func()) *MockDevice_GetPropert return _c } -func (_c *MockDevice_GetPropertyUdi_Call) Return(_a0 string, _a1 error) *MockDevice_GetPropertyUdi_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_GetPropertyUdi_Call) Return(s string, err error) *MockDevice_GetPropertyUdi_Call { + _c.Call.Return(s, err) return _c } @@ -1379,9 +1347,9 @@ func (_c *MockDevice_GetPropertyUdi_Call) RunAndReturn(run func() (string, error return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockDevice) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockDevice +func (_mock *MockDevice) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -1389,23 +1357,21 @@ func (_m *MockDevice) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1426,8 +1392,8 @@ func (_c *MockDevice_MarshalJSON_Call) Run(run func()) *MockDevice_MarshalJSON_C return _c } -func (_c *MockDevice_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockDevice_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDevice_MarshalJSON_Call) Return(bytes []byte, err error) *MockDevice_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -1436,21 +1402,20 @@ func (_c *MockDevice_MarshalJSON_Call) RunAndReturn(run func() ([]byte, error)) return _c } -// Reapply provides a mock function with given fields: connection, versionId, flags -func (_m *MockDevice) Reapply(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error { - ret := _m.Called(connection, versionId, flags) +// Reapply provides a mock function for the type MockDevice +func (_mock *MockDevice) Reapply(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error { + ret := _mock.Called(connection, versionId, flags) if len(ret) == 0 { panic("no return value specified for Reapply") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, uint64, uint32) error); ok { - r0 = rf(connection, versionId, flags) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, uint64, uint32) error); ok { + r0 = returnFunc(connection, versionId, flags) } else { r0 = ret.Error(0) } - return r0 } @@ -1463,42 +1428,57 @@ type MockDevice_Reapply_Call struct { // - connection gonetworkmanager.Connection // - versionId uint64 // - flags uint32 -func (_e *MockDevice_Expecter) Reapply(connection interface{}, versionId interface{}, flags interface{}) *MockDevice_Reapply_Call { +func (_e *MockDevice_Expecter) Reapply(connection any, versionId any, flags any) *MockDevice_Reapply_Call { return &MockDevice_Reapply_Call{Call: _e.mock.On("Reapply", connection, versionId, flags)} } func (_c *MockDevice_Reapply_Call) Run(run func(connection gonetworkmanager.Connection, versionId uint64, flags uint32)) *MockDevice_Reapply_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Connection), args[1].(uint64), args[2].(uint32)) + var arg0 gonetworkmanager.Connection + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Connection) + } + var arg1 uint64 + if args[1] != nil { + arg1 = args[1].(uint64) + } + var arg2 uint32 + if args[2] != nil { + arg2 = args[2].(uint32) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockDevice_Reapply_Call) Return(_a0 error) *MockDevice_Reapply_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_Reapply_Call) Return(err error) *MockDevice_Reapply_Call { + _c.Call.Return(err) return _c } -func (_c *MockDevice_Reapply_Call) RunAndReturn(run func(gonetworkmanager.Connection, uint64, uint32) error) *MockDevice_Reapply_Call { +func (_c *MockDevice_Reapply_Call) RunAndReturn(run func(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error) *MockDevice_Reapply_Call { _c.Call.Return(run) return _c } -// SetPropertyAutoConnect provides a mock function with given fields: _a0 -func (_m *MockDevice) SetPropertyAutoConnect(_a0 bool) error { - ret := _m.Called(_a0) +// SetPropertyAutoConnect provides a mock function for the type MockDevice +func (_mock *MockDevice) SetPropertyAutoConnect(b bool) error { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for SetPropertyAutoConnect") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(b) } else { r0 = ret.Error(0) } - return r0 } @@ -1508,43 +1488,48 @@ type MockDevice_SetPropertyAutoConnect_Call struct { } // SetPropertyAutoConnect is a helper method to define mock.On call -// - _a0 bool -func (_e *MockDevice_Expecter) SetPropertyAutoConnect(_a0 interface{}) *MockDevice_SetPropertyAutoConnect_Call { - return &MockDevice_SetPropertyAutoConnect_Call{Call: _e.mock.On("SetPropertyAutoConnect", _a0)} +// - b bool +func (_e *MockDevice_Expecter) SetPropertyAutoConnect(b any) *MockDevice_SetPropertyAutoConnect_Call { + return &MockDevice_SetPropertyAutoConnect_Call{Call: _e.mock.On("SetPropertyAutoConnect", b)} } -func (_c *MockDevice_SetPropertyAutoConnect_Call) Run(run func(_a0 bool)) *MockDevice_SetPropertyAutoConnect_Call { +func (_c *MockDevice_SetPropertyAutoConnect_Call) Run(run func(b bool)) *MockDevice_SetPropertyAutoConnect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockDevice_SetPropertyAutoConnect_Call) Return(_a0 error) *MockDevice_SetPropertyAutoConnect_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_SetPropertyAutoConnect_Call) Return(err error) *MockDevice_SetPropertyAutoConnect_Call { + _c.Call.Return(err) return _c } -func (_c *MockDevice_SetPropertyAutoConnect_Call) RunAndReturn(run func(bool) error) *MockDevice_SetPropertyAutoConnect_Call { +func (_c *MockDevice_SetPropertyAutoConnect_Call) RunAndReturn(run func(b bool) error) *MockDevice_SetPropertyAutoConnect_Call { _c.Call.Return(run) return _c } -// SetPropertyManaged provides a mock function with given fields: _a0 -func (_m *MockDevice) SetPropertyManaged(_a0 bool) error { - ret := _m.Called(_a0) +// SetPropertyManaged provides a mock function for the type MockDevice +func (_mock *MockDevice) SetPropertyManaged(b bool) error { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for SetPropertyManaged") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(b) } else { r0 = ret.Error(0) } - return r0 } @@ -1554,43 +1539,48 @@ type MockDevice_SetPropertyManaged_Call struct { } // SetPropertyManaged is a helper method to define mock.On call -// - _a0 bool -func (_e *MockDevice_Expecter) SetPropertyManaged(_a0 interface{}) *MockDevice_SetPropertyManaged_Call { - return &MockDevice_SetPropertyManaged_Call{Call: _e.mock.On("SetPropertyManaged", _a0)} +// - b bool +func (_e *MockDevice_Expecter) SetPropertyManaged(b any) *MockDevice_SetPropertyManaged_Call { + return &MockDevice_SetPropertyManaged_Call{Call: _e.mock.On("SetPropertyManaged", b)} } -func (_c *MockDevice_SetPropertyManaged_Call) Run(run func(_a0 bool)) *MockDevice_SetPropertyManaged_Call { +func (_c *MockDevice_SetPropertyManaged_Call) Run(run func(b bool)) *MockDevice_SetPropertyManaged_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockDevice_SetPropertyManaged_Call) Return(_a0 error) *MockDevice_SetPropertyManaged_Call { - _c.Call.Return(_a0) +func (_c *MockDevice_SetPropertyManaged_Call) Return(err error) *MockDevice_SetPropertyManaged_Call { + _c.Call.Return(err) return _c } -func (_c *MockDevice_SetPropertyManaged_Call) RunAndReturn(run func(bool) error) *MockDevice_SetPropertyManaged_Call { +func (_c *MockDevice_SetPropertyManaged_Call) RunAndReturn(run func(b bool) error) *MockDevice_SetPropertyManaged_Call { _c.Call.Return(run) return _c } -// SubscribeState provides a mock function with given fields: receiver, exit -func (_m *MockDevice) SubscribeState(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error { - ret := _m.Called(receiver, exit) +// SubscribeState provides a mock function for the type MockDevice +func (_mock *MockDevice) SubscribeState(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error { + ret := _mock.Called(receiver, exit) if len(ret) == 0 { panic("no return value specified for SubscribeState") } var r0 error - if rf, ok := ret.Get(0).(func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error); ok { - r0 = rf(receiver, exit) + if returnFunc, ok := ret.Get(0).(func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error); ok { + r0 = returnFunc(receiver, exit) } else { r0 = ret.Error(0) } - return r0 } @@ -1602,13 +1592,24 @@ type MockDevice_SubscribeState_Call struct { // SubscribeState is a helper method to define mock.On call // - receiver chan gonetworkmanager.DeviceStateChange // - exit chan struct{} -func (_e *MockDevice_Expecter) SubscribeState(receiver interface{}, exit interface{}) *MockDevice_SubscribeState_Call { +func (_e *MockDevice_Expecter) SubscribeState(receiver any, exit any) *MockDevice_SubscribeState_Call { return &MockDevice_SubscribeState_Call{Call: _e.mock.On("SubscribeState", receiver, exit)} } func (_c *MockDevice_SubscribeState_Call) Run(run func(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{})) *MockDevice_SubscribeState_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(chan gonetworkmanager.DeviceStateChange), args[1].(chan struct{})) + var arg0 chan gonetworkmanager.DeviceStateChange + if args[0] != nil { + arg0 = args[0].(chan gonetworkmanager.DeviceStateChange) + } + var arg1 chan struct{} + if args[1] != nil { + arg1 = args[1].(chan struct{}) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1618,21 +1619,7 @@ func (_c *MockDevice_SubscribeState_Call) Return(err error) *MockDevice_Subscrib return _c } -func (_c *MockDevice_SubscribeState_Call) RunAndReturn(run func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error) *MockDevice_SubscribeState_Call { +func (_c *MockDevice_SubscribeState_Call) RunAndReturn(run func(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error) *MockDevice_SubscribeState_Call { _c.Call.Return(run) return _c } - -// NewMockDevice creates a new instance of MockDevice. 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 NewMockDevice(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDevice { - mock := &MockDevice{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_DeviceWireless.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_DeviceWireless.go index d2d3f2d6..dd031166 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_DeviceWireless.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_DeviceWireless.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockDeviceWireless creates a new instance of MockDeviceWireless. 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 NewMockDeviceWireless(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDeviceWireless { + mock := &MockDeviceWireless{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockDeviceWireless is an autogenerated mock type for the DeviceWireless type type MockDeviceWireless struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *MockDeviceWireless) EXPECT() *MockDeviceWireless_Expecter { return &MockDeviceWireless_Expecter{mock: &_m.Mock} } -// Delete provides a mock function with no fields -func (_m *MockDeviceWireless) Delete() error { - ret := _m.Called() +// Delete provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) Delete() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -57,8 +71,8 @@ func (_c *MockDeviceWireless_Delete_Call) Run(run func()) *MockDeviceWireless_De return _c } -func (_c *MockDeviceWireless_Delete_Call) Return(_a0 error) *MockDeviceWireless_Delete_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_Delete_Call) Return(err error) *MockDeviceWireless_Delete_Call { + _c.Call.Return(err) return _c } @@ -67,21 +81,20 @@ func (_c *MockDeviceWireless_Delete_Call) RunAndReturn(run func() error) *MockDe return _c } -// Disconnect provides a mock function with no fields -func (_m *MockDeviceWireless) Disconnect() error { - ret := _m.Called() +// Disconnect provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) Disconnect() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Disconnect") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -102,8 +115,8 @@ func (_c *MockDeviceWireless_Disconnect_Call) Run(run func()) *MockDeviceWireles return _c } -func (_c *MockDeviceWireless_Disconnect_Call) Return(_a0 error) *MockDeviceWireless_Disconnect_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_Disconnect_Call) Return(err error) *MockDeviceWireless_Disconnect_Call { + _c.Call.Return(err) return _c } @@ -112,9 +125,9 @@ func (_c *MockDeviceWireless_Disconnect_Call) RunAndReturn(run func() error) *Mo return _c } -// GetAccessPoints provides a mock function with no fields -func (_m *MockDeviceWireless) GetAccessPoints() ([]gonetworkmanager.AccessPoint, error) { - ret := _m.Called() +// GetAccessPoints provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetAccessPoints() ([]gonetworkmanager.AccessPoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetAccessPoints") @@ -122,23 +135,21 @@ func (_m *MockDeviceWireless) GetAccessPoints() ([]gonetworkmanager.AccessPoint, var r0 []gonetworkmanager.AccessPoint var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.AccessPoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -159,8 +170,8 @@ func (_c *MockDeviceWireless_GetAccessPoints_Call) Run(run func()) *MockDeviceWi return _c } -func (_c *MockDeviceWireless_GetAccessPoints_Call) Return(_a0 []gonetworkmanager.AccessPoint, _a1 error) *MockDeviceWireless_GetAccessPoints_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetAccessPoints_Call) Return(accessPoints []gonetworkmanager.AccessPoint, err error) *MockDeviceWireless_GetAccessPoints_Call { + _c.Call.Return(accessPoints, err) return _c } @@ -169,9 +180,9 @@ func (_c *MockDeviceWireless_GetAccessPoints_Call) RunAndReturn(run func() ([]go return _c } -// GetAllAccessPoints provides a mock function with no fields -func (_m *MockDeviceWireless) GetAllAccessPoints() ([]gonetworkmanager.AccessPoint, error) { - ret := _m.Called() +// GetAllAccessPoints provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetAllAccessPoints() ([]gonetworkmanager.AccessPoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetAllAccessPoints") @@ -179,23 +190,21 @@ func (_m *MockDeviceWireless) GetAllAccessPoints() ([]gonetworkmanager.AccessPoi var r0 []gonetworkmanager.AccessPoint var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.AccessPoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -216,8 +225,8 @@ func (_c *MockDeviceWireless_GetAllAccessPoints_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDeviceWireless_GetAllAccessPoints_Call) Return(_a0 []gonetworkmanager.AccessPoint, _a1 error) *MockDeviceWireless_GetAllAccessPoints_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetAllAccessPoints_Call) Return(accessPoints []gonetworkmanager.AccessPoint, err error) *MockDeviceWireless_GetAllAccessPoints_Call { + _c.Call.Return(accessPoints, err) return _c } @@ -226,21 +235,20 @@ func (_c *MockDeviceWireless_GetAllAccessPoints_Call) RunAndReturn(run func() ([ return _c } -// GetPath provides a mock function with no fields -func (_m *MockDeviceWireless) GetPath() dbus.ObjectPath { - ret := _m.Called() +// GetPath provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPath() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPath") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -261,8 +269,8 @@ func (_c *MockDeviceWireless_GetPath_Call) Run(run func()) *MockDeviceWireless_G return _c } -func (_c *MockDeviceWireless_GetPath_Call) Return(_a0 dbus.ObjectPath) *MockDeviceWireless_GetPath_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockDeviceWireless_GetPath_Call { + _c.Call.Return(objectPath) return _c } @@ -271,9 +279,9 @@ func (_c *MockDeviceWireless_GetPath_Call) RunAndReturn(run func() dbus.ObjectPa return _c } -// GetPropertyAccessPoints provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyAccessPoints() ([]gonetworkmanager.AccessPoint, error) { - ret := _m.Called() +// GetPropertyAccessPoints provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyAccessPoints() ([]gonetworkmanager.AccessPoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAccessPoints") @@ -281,23 +289,21 @@ func (_m *MockDeviceWireless) GetPropertyAccessPoints() ([]gonetworkmanager.Acce var r0 []gonetworkmanager.AccessPoint var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.AccessPoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.AccessPoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.AccessPoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -318,8 +324,8 @@ func (_c *MockDeviceWireless_GetPropertyAccessPoints_Call) Run(run func()) *Mock return _c } -func (_c *MockDeviceWireless_GetPropertyAccessPoints_Call) Return(_a0 []gonetworkmanager.AccessPoint, _a1 error) *MockDeviceWireless_GetPropertyAccessPoints_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyAccessPoints_Call) Return(accessPoints []gonetworkmanager.AccessPoint, err error) *MockDeviceWireless_GetPropertyAccessPoints_Call { + _c.Call.Return(accessPoints, err) return _c } @@ -328,9 +334,9 @@ func (_c *MockDeviceWireless_GetPropertyAccessPoints_Call) RunAndReturn(run func return _c } -// GetPropertyActiveAccessPoint provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyActiveAccessPoint() (gonetworkmanager.AccessPoint, error) { - ret := _m.Called() +// GetPropertyActiveAccessPoint provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyActiveAccessPoint() (gonetworkmanager.AccessPoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyActiveAccessPoint") @@ -338,23 +344,21 @@ func (_m *MockDeviceWireless) GetPropertyActiveAccessPoint() (gonetworkmanager.A var r0 gonetworkmanager.AccessPoint var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.AccessPoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.AccessPoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.AccessPoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.AccessPoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.AccessPoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -375,8 +379,8 @@ func (_c *MockDeviceWireless_GetPropertyActiveAccessPoint_Call) Run(run func()) return _c } -func (_c *MockDeviceWireless_GetPropertyActiveAccessPoint_Call) Return(_a0 gonetworkmanager.AccessPoint, _a1 error) *MockDeviceWireless_GetPropertyActiveAccessPoint_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyActiveAccessPoint_Call) Return(accessPoint gonetworkmanager.AccessPoint, err error) *MockDeviceWireless_GetPropertyActiveAccessPoint_Call { + _c.Call.Return(accessPoint, err) return _c } @@ -385,9 +389,9 @@ func (_c *MockDeviceWireless_GetPropertyActiveAccessPoint_Call) RunAndReturn(run return _c } -// GetPropertyActiveConnection provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyActiveConnection() (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called() +// GetPropertyActiveConnection provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyActiveConnection() (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyActiveConnection") @@ -395,23 +399,21 @@ func (_m *MockDeviceWireless) GetPropertyActiveConnection() (gonetworkmanager.Ac var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -432,8 +434,8 @@ func (_c *MockDeviceWireless_GetPropertyActiveConnection_Call) Run(run func()) * return _c } -func (_c *MockDeviceWireless_GetPropertyActiveConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockDeviceWireless_GetPropertyActiveConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyActiveConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockDeviceWireless_GetPropertyActiveConnection_Call { + _c.Call.Return(activeConnection, err) return _c } @@ -442,9 +444,9 @@ func (_c *MockDeviceWireless_GetPropertyActiveConnection_Call) RunAndReturn(run return _c } -// GetPropertyAutoConnect provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyAutoConnect() (bool, error) { - ret := _m.Called() +// GetPropertyAutoConnect provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyAutoConnect() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAutoConnect") @@ -452,21 +454,19 @@ func (_m *MockDeviceWireless) GetPropertyAutoConnect() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -487,8 +487,8 @@ func (_c *MockDeviceWireless_GetPropertyAutoConnect_Call) Run(run func()) *MockD return _c } -func (_c *MockDeviceWireless_GetPropertyAutoConnect_Call) Return(_a0 bool, _a1 error) *MockDeviceWireless_GetPropertyAutoConnect_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyAutoConnect_Call) Return(b bool, err error) *MockDeviceWireless_GetPropertyAutoConnect_Call { + _c.Call.Return(b, err) return _c } @@ -497,9 +497,9 @@ func (_c *MockDeviceWireless_GetPropertyAutoConnect_Call) RunAndReturn(run func( return _c } -// GetPropertyAvailableConnections provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyAvailableConnections() ([]gonetworkmanager.Connection, error) { - ret := _m.Called() +// GetPropertyAvailableConnections provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyAvailableConnections() ([]gonetworkmanager.Connection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAvailableConnections") @@ -507,23 +507,21 @@ func (_m *MockDeviceWireless) GetPropertyAvailableConnections() ([]gonetworkmana var r0 []gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -544,8 +542,8 @@ func (_c *MockDeviceWireless_GetPropertyAvailableConnections_Call) Run(run func( return _c } -func (_c *MockDeviceWireless_GetPropertyAvailableConnections_Call) Return(_a0 []gonetworkmanager.Connection, _a1 error) *MockDeviceWireless_GetPropertyAvailableConnections_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyAvailableConnections_Call) Return(connections []gonetworkmanager.Connection, err error) *MockDeviceWireless_GetPropertyAvailableConnections_Call { + _c.Call.Return(connections, err) return _c } @@ -554,9 +552,9 @@ func (_c *MockDeviceWireless_GetPropertyAvailableConnections_Call) RunAndReturn( return _c } -// GetPropertyBitrate provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyBitrate() (uint32, error) { - ret := _m.Called() +// GetPropertyBitrate provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyBitrate() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyBitrate") @@ -564,21 +562,19 @@ func (_m *MockDeviceWireless) GetPropertyBitrate() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -599,8 +595,8 @@ func (_c *MockDeviceWireless_GetPropertyBitrate_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDeviceWireless_GetPropertyBitrate_Call) Return(_a0 uint32, _a1 error) *MockDeviceWireless_GetPropertyBitrate_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyBitrate_Call) Return(v uint32, err error) *MockDeviceWireless_GetPropertyBitrate_Call { + _c.Call.Return(v, err) return _c } @@ -609,9 +605,9 @@ func (_c *MockDeviceWireless_GetPropertyBitrate_Call) RunAndReturn(run func() (u return _c } -// GetPropertyDHCP4Config provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { - ret := _m.Called() +// GetPropertyDHCP4Config provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP4Config") @@ -619,23 +615,21 @@ func (_m *MockDeviceWireless) GetPropertyDHCP4Config() (gonetworkmanager.DHCP4Co var r0 gonetworkmanager.DHCP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -656,8 +650,8 @@ func (_c *MockDeviceWireless_GetPropertyDHCP4Config_Call) Run(run func()) *MockD return _c } -func (_c *MockDeviceWireless_GetPropertyDHCP4Config_Call) Return(_a0 gonetworkmanager.DHCP4Config, _a1 error) *MockDeviceWireless_GetPropertyDHCP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyDHCP4Config_Call) Return(dHCP4Config gonetworkmanager.DHCP4Config, err error) *MockDeviceWireless_GetPropertyDHCP4Config_Call { + _c.Call.Return(dHCP4Config, err) return _c } @@ -666,9 +660,9 @@ func (_c *MockDeviceWireless_GetPropertyDHCP4Config_Call) RunAndReturn(run func( return _c } -// GetPropertyDHCP6Config provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { - ret := _m.Called() +// GetPropertyDHCP6Config provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDHCP6Config") @@ -676,23 +670,21 @@ func (_m *MockDeviceWireless) GetPropertyDHCP6Config() (gonetworkmanager.DHCP6Co var r0 gonetworkmanager.DHCP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.DHCP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.DHCP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.DHCP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -713,8 +705,8 @@ func (_c *MockDeviceWireless_GetPropertyDHCP6Config_Call) Run(run func()) *MockD return _c } -func (_c *MockDeviceWireless_GetPropertyDHCP6Config_Call) Return(_a0 gonetworkmanager.DHCP6Config, _a1 error) *MockDeviceWireless_GetPropertyDHCP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyDHCP6Config_Call) Return(dHCP6Config gonetworkmanager.DHCP6Config, err error) *MockDeviceWireless_GetPropertyDHCP6Config_Call { + _c.Call.Return(dHCP6Config, err) return _c } @@ -723,9 +715,9 @@ func (_c *MockDeviceWireless_GetPropertyDHCP6Config_Call) RunAndReturn(run func( return _c } -// GetPropertyDeviceType provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyDeviceType() (gonetworkmanager.NmDeviceType, error) { - ret := _m.Called() +// GetPropertyDeviceType provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyDeviceType() (gonetworkmanager.NmDeviceType, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDeviceType") @@ -733,21 +725,19 @@ func (_m *MockDeviceWireless) GetPropertyDeviceType() (gonetworkmanager.NmDevice var r0 gonetworkmanager.NmDeviceType var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceType, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceType, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceType); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceType); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmDeviceType) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -768,8 +758,8 @@ func (_c *MockDeviceWireless_GetPropertyDeviceType_Call) Run(run func()) *MockDe return _c } -func (_c *MockDeviceWireless_GetPropertyDeviceType_Call) Return(_a0 gonetworkmanager.NmDeviceType, _a1 error) *MockDeviceWireless_GetPropertyDeviceType_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyDeviceType_Call) Return(nmDeviceType gonetworkmanager.NmDeviceType, err error) *MockDeviceWireless_GetPropertyDeviceType_Call { + _c.Call.Return(nmDeviceType, err) return _c } @@ -778,9 +768,9 @@ func (_c *MockDeviceWireless_GetPropertyDeviceType_Call) RunAndReturn(run func() return _c } -// GetPropertyDriver provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyDriver() (string, error) { - ret := _m.Called() +// GetPropertyDriver provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyDriver() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDriver") @@ -788,21 +778,19 @@ func (_m *MockDeviceWireless) GetPropertyDriver() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -823,8 +811,8 @@ func (_c *MockDeviceWireless_GetPropertyDriver_Call) Run(run func()) *MockDevice return _c } -func (_c *MockDeviceWireless_GetPropertyDriver_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyDriver_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyDriver_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyDriver_Call { + _c.Call.Return(s, err) return _c } @@ -833,9 +821,9 @@ func (_c *MockDeviceWireless_GetPropertyDriver_Call) RunAndReturn(run func() (st return _c } -// GetPropertyDriverVersion provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyDriverVersion() (string, error) { - ret := _m.Called() +// GetPropertyDriverVersion provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyDriverVersion() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDriverVersion") @@ -843,21 +831,19 @@ func (_m *MockDeviceWireless) GetPropertyDriverVersion() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -878,8 +864,8 @@ func (_c *MockDeviceWireless_GetPropertyDriverVersion_Call) Run(run func()) *Moc return _c } -func (_c *MockDeviceWireless_GetPropertyDriverVersion_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyDriverVersion_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyDriverVersion_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyDriverVersion_Call { + _c.Call.Return(s, err) return _c } @@ -888,9 +874,9 @@ func (_c *MockDeviceWireless_GetPropertyDriverVersion_Call) RunAndReturn(run fun return _c } -// GetPropertyFirmwareMissing provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyFirmwareMissing() (bool, error) { - ret := _m.Called() +// GetPropertyFirmwareMissing provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyFirmwareMissing() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFirmwareMissing") @@ -898,21 +884,19 @@ func (_m *MockDeviceWireless) GetPropertyFirmwareMissing() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -933,8 +917,8 @@ func (_c *MockDeviceWireless_GetPropertyFirmwareMissing_Call) Run(run func()) *M return _c } -func (_c *MockDeviceWireless_GetPropertyFirmwareMissing_Call) Return(_a0 bool, _a1 error) *MockDeviceWireless_GetPropertyFirmwareMissing_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyFirmwareMissing_Call) Return(b bool, err error) *MockDeviceWireless_GetPropertyFirmwareMissing_Call { + _c.Call.Return(b, err) return _c } @@ -943,9 +927,9 @@ func (_c *MockDeviceWireless_GetPropertyFirmwareMissing_Call) RunAndReturn(run f return _c } -// GetPropertyFirmwareVersion provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyFirmwareVersion() (string, error) { - ret := _m.Called() +// GetPropertyFirmwareVersion provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyFirmwareVersion() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyFirmwareVersion") @@ -953,21 +937,19 @@ func (_m *MockDeviceWireless) GetPropertyFirmwareVersion() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -988,8 +970,8 @@ func (_c *MockDeviceWireless_GetPropertyFirmwareVersion_Call) Run(run func()) *M return _c } -func (_c *MockDeviceWireless_GetPropertyFirmwareVersion_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyFirmwareVersion_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyFirmwareVersion_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyFirmwareVersion_Call { + _c.Call.Return(s, err) return _c } @@ -998,9 +980,9 @@ func (_c *MockDeviceWireless_GetPropertyFirmwareVersion_Call) RunAndReturn(run f return _c } -// GetPropertyHwAddress provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyHwAddress() (string, error) { - ret := _m.Called() +// GetPropertyHwAddress provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyHwAddress() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyHwAddress") @@ -1008,21 +990,19 @@ func (_m *MockDeviceWireless) GetPropertyHwAddress() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1043,8 +1023,8 @@ func (_c *MockDeviceWireless_GetPropertyHwAddress_Call) Run(run func()) *MockDev return _c } -func (_c *MockDeviceWireless_GetPropertyHwAddress_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyHwAddress_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyHwAddress_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyHwAddress_Call { + _c.Call.Return(s, err) return _c } @@ -1053,9 +1033,9 @@ func (_c *MockDeviceWireless_GetPropertyHwAddress_Call) RunAndReturn(run func() return _c } -// GetPropertyIP4Config provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { - ret := _m.Called() +// GetPropertyIP4Config provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyIP4Config() (gonetworkmanager.IP4Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP4Config") @@ -1063,23 +1043,21 @@ func (_m *MockDeviceWireless) GetPropertyIP4Config() (gonetworkmanager.IP4Config var r0 gonetworkmanager.IP4Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP4Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP4Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP4Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1100,8 +1078,8 @@ func (_c *MockDeviceWireless_GetPropertyIP4Config_Call) Run(run func()) *MockDev return _c } -func (_c *MockDeviceWireless_GetPropertyIP4Config_Call) Return(_a0 gonetworkmanager.IP4Config, _a1 error) *MockDeviceWireless_GetPropertyIP4Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyIP4Config_Call) Return(iP4Config gonetworkmanager.IP4Config, err error) *MockDeviceWireless_GetPropertyIP4Config_Call { + _c.Call.Return(iP4Config, err) return _c } @@ -1110,9 +1088,9 @@ func (_c *MockDeviceWireless_GetPropertyIP4Config_Call) RunAndReturn(run func() return _c } -// GetPropertyIP6Config provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { - ret := _m.Called() +// GetPropertyIP6Config provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyIP6Config() (gonetworkmanager.IP6Config, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIP6Config") @@ -1120,23 +1098,21 @@ func (_m *MockDeviceWireless) GetPropertyIP6Config() (gonetworkmanager.IP6Config var r0 gonetworkmanager.IP6Config var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.IP6Config, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.IP6Config); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.IP6Config) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1157,8 +1133,8 @@ func (_c *MockDeviceWireless_GetPropertyIP6Config_Call) Run(run func()) *MockDev return _c } -func (_c *MockDeviceWireless_GetPropertyIP6Config_Call) Return(_a0 gonetworkmanager.IP6Config, _a1 error) *MockDeviceWireless_GetPropertyIP6Config_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyIP6Config_Call) Return(iP6Config gonetworkmanager.IP6Config, err error) *MockDeviceWireless_GetPropertyIP6Config_Call { + _c.Call.Return(iP6Config, err) return _c } @@ -1167,9 +1143,9 @@ func (_c *MockDeviceWireless_GetPropertyIP6Config_Call) RunAndReturn(run func() return _c } -// GetPropertyInterface provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyInterface() (string, error) { - ret := _m.Called() +// GetPropertyInterface provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyInterface() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyInterface") @@ -1177,21 +1153,19 @@ func (_m *MockDeviceWireless) GetPropertyInterface() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1212,8 +1186,8 @@ func (_c *MockDeviceWireless_GetPropertyInterface_Call) Run(run func()) *MockDev return _c } -func (_c *MockDeviceWireless_GetPropertyInterface_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyInterface_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyInterface_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyInterface_Call { + _c.Call.Return(s, err) return _c } @@ -1222,9 +1196,9 @@ func (_c *MockDeviceWireless_GetPropertyInterface_Call) RunAndReturn(run func() return _c } -// GetPropertyIp4Connectivity provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyIp4Connectivity() (gonetworkmanager.NmConnectivity, error) { - ret := _m.Called() +// GetPropertyIp4Connectivity provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyIp4Connectivity() (gonetworkmanager.NmConnectivity, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIp4Connectivity") @@ -1232,21 +1206,19 @@ func (_m *MockDeviceWireless) GetPropertyIp4Connectivity() (gonetworkmanager.NmC var r0 gonetworkmanager.NmConnectivity var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmConnectivity) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1267,8 +1239,8 @@ func (_c *MockDeviceWireless_GetPropertyIp4Connectivity_Call) Run(run func()) *M return _c } -func (_c *MockDeviceWireless_GetPropertyIp4Connectivity_Call) Return(_a0 gonetworkmanager.NmConnectivity, _a1 error) *MockDeviceWireless_GetPropertyIp4Connectivity_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyIp4Connectivity_Call) Return(nmConnectivity gonetworkmanager.NmConnectivity, err error) *MockDeviceWireless_GetPropertyIp4Connectivity_Call { + _c.Call.Return(nmConnectivity, err) return _c } @@ -1277,9 +1249,9 @@ func (_c *MockDeviceWireless_GetPropertyIp4Connectivity_Call) RunAndReturn(run f return _c } -// GetPropertyIpInterface provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyIpInterface() (string, error) { - ret := _m.Called() +// GetPropertyIpInterface provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyIpInterface() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyIpInterface") @@ -1287,21 +1259,19 @@ func (_m *MockDeviceWireless) GetPropertyIpInterface() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1322,8 +1292,8 @@ func (_c *MockDeviceWireless_GetPropertyIpInterface_Call) Run(run func()) *MockD return _c } -func (_c *MockDeviceWireless_GetPropertyIpInterface_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyIpInterface_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyIpInterface_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyIpInterface_Call { + _c.Call.Return(s, err) return _c } @@ -1332,9 +1302,9 @@ func (_c *MockDeviceWireless_GetPropertyIpInterface_Call) RunAndReturn(run func( return _c } -// GetPropertyLastScan provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyLastScan() (int64, error) { - ret := _m.Called() +// GetPropertyLastScan provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyLastScan() (int64, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyLastScan") @@ -1342,21 +1312,19 @@ func (_m *MockDeviceWireless) GetPropertyLastScan() (int64, error) { var r0 int64 var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (int64, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() int64); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(int64) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1377,8 +1345,8 @@ func (_c *MockDeviceWireless_GetPropertyLastScan_Call) Run(run func()) *MockDevi return _c } -func (_c *MockDeviceWireless_GetPropertyLastScan_Call) Return(_a0 int64, _a1 error) *MockDeviceWireless_GetPropertyLastScan_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyLastScan_Call) Return(n int64, err error) *MockDeviceWireless_GetPropertyLastScan_Call { + _c.Call.Return(n, err) return _c } @@ -1387,9 +1355,9 @@ func (_c *MockDeviceWireless_GetPropertyLastScan_Call) RunAndReturn(run func() ( return _c } -// GetPropertyManaged provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyManaged() (bool, error) { - ret := _m.Called() +// GetPropertyManaged provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyManaged() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyManaged") @@ -1397,21 +1365,19 @@ func (_m *MockDeviceWireless) GetPropertyManaged() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1432,8 +1398,8 @@ func (_c *MockDeviceWireless_GetPropertyManaged_Call) Run(run func()) *MockDevic return _c } -func (_c *MockDeviceWireless_GetPropertyManaged_Call) Return(_a0 bool, _a1 error) *MockDeviceWireless_GetPropertyManaged_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyManaged_Call) Return(b bool, err error) *MockDeviceWireless_GetPropertyManaged_Call { + _c.Call.Return(b, err) return _c } @@ -1442,9 +1408,9 @@ func (_c *MockDeviceWireless_GetPropertyManaged_Call) RunAndReturn(run func() (b return _c } -// GetPropertyMode provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyMode() (gonetworkmanager.Nm80211Mode, error) { - ret := _m.Called() +// GetPropertyMode provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyMode() (gonetworkmanager.Nm80211Mode, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMode") @@ -1452,21 +1418,19 @@ func (_m *MockDeviceWireless) GetPropertyMode() (gonetworkmanager.Nm80211Mode, e var r0 gonetworkmanager.Nm80211Mode var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.Nm80211Mode, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.Nm80211Mode, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.Nm80211Mode); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.Nm80211Mode); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.Nm80211Mode) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1487,8 +1451,8 @@ func (_c *MockDeviceWireless_GetPropertyMode_Call) Run(run func()) *MockDeviceWi return _c } -func (_c *MockDeviceWireless_GetPropertyMode_Call) Return(_a0 gonetworkmanager.Nm80211Mode, _a1 error) *MockDeviceWireless_GetPropertyMode_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyMode_Call) Return(nm80211Mode gonetworkmanager.Nm80211Mode, err error) *MockDeviceWireless_GetPropertyMode_Call { + _c.Call.Return(nm80211Mode, err) return _c } @@ -1497,9 +1461,9 @@ func (_c *MockDeviceWireless_GetPropertyMode_Call) RunAndReturn(run func() (gone return _c } -// GetPropertyMtu provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyMtu() (uint32, error) { - ret := _m.Called() +// GetPropertyMtu provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyMtu() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMtu") @@ -1507,21 +1471,19 @@ func (_m *MockDeviceWireless) GetPropertyMtu() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1542,8 +1504,8 @@ func (_c *MockDeviceWireless_GetPropertyMtu_Call) Run(run func()) *MockDeviceWir return _c } -func (_c *MockDeviceWireless_GetPropertyMtu_Call) Return(_a0 uint32, _a1 error) *MockDeviceWireless_GetPropertyMtu_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyMtu_Call) Return(v uint32, err error) *MockDeviceWireless_GetPropertyMtu_Call { + _c.Call.Return(v, err) return _c } @@ -1552,9 +1514,9 @@ func (_c *MockDeviceWireless_GetPropertyMtu_Call) RunAndReturn(run func() (uint3 return _c } -// GetPropertyNmPluginMissing provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyNmPluginMissing() (bool, error) { - ret := _m.Called() +// GetPropertyNmPluginMissing provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyNmPluginMissing() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyNmPluginMissing") @@ -1562,21 +1524,19 @@ func (_m *MockDeviceWireless) GetPropertyNmPluginMissing() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1597,8 +1557,8 @@ func (_c *MockDeviceWireless_GetPropertyNmPluginMissing_Call) Run(run func()) *M return _c } -func (_c *MockDeviceWireless_GetPropertyNmPluginMissing_Call) Return(_a0 bool, _a1 error) *MockDeviceWireless_GetPropertyNmPluginMissing_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyNmPluginMissing_Call) Return(b bool, err error) *MockDeviceWireless_GetPropertyNmPluginMissing_Call { + _c.Call.Return(b, err) return _c } @@ -1607,9 +1567,9 @@ func (_c *MockDeviceWireless_GetPropertyNmPluginMissing_Call) RunAndReturn(run f return _c } -// GetPropertyPermHwAddress provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyPermHwAddress() (string, error) { - ret := _m.Called() +// GetPropertyPermHwAddress provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyPermHwAddress() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyPermHwAddress") @@ -1617,21 +1577,19 @@ func (_m *MockDeviceWireless) GetPropertyPermHwAddress() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1652,8 +1610,8 @@ func (_c *MockDeviceWireless_GetPropertyPermHwAddress_Call) Run(run func()) *Moc return _c } -func (_c *MockDeviceWireless_GetPropertyPermHwAddress_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyPermHwAddress_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyPermHwAddress_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyPermHwAddress_Call { + _c.Call.Return(s, err) return _c } @@ -1662,9 +1620,9 @@ func (_c *MockDeviceWireless_GetPropertyPermHwAddress_Call) RunAndReturn(run fun return _c } -// GetPropertyPhysicalPortId provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyPhysicalPortId() (string, error) { - ret := _m.Called() +// GetPropertyPhysicalPortId provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyPhysicalPortId() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyPhysicalPortId") @@ -1672,21 +1630,19 @@ func (_m *MockDeviceWireless) GetPropertyPhysicalPortId() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1707,8 +1663,8 @@ func (_c *MockDeviceWireless_GetPropertyPhysicalPortId_Call) Run(run func()) *Mo return _c } -func (_c *MockDeviceWireless_GetPropertyPhysicalPortId_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyPhysicalPortId_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyPhysicalPortId_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyPhysicalPortId_Call { + _c.Call.Return(s, err) return _c } @@ -1717,9 +1673,9 @@ func (_c *MockDeviceWireless_GetPropertyPhysicalPortId_Call) RunAndReturn(run fu return _c } -// GetPropertyReal provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyReal() (bool, error) { - ret := _m.Called() +// GetPropertyReal provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyReal() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyReal") @@ -1727,21 +1683,19 @@ func (_m *MockDeviceWireless) GetPropertyReal() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1762,8 +1716,8 @@ func (_c *MockDeviceWireless_GetPropertyReal_Call) Run(run func()) *MockDeviceWi return _c } -func (_c *MockDeviceWireless_GetPropertyReal_Call) Return(_a0 bool, _a1 error) *MockDeviceWireless_GetPropertyReal_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyReal_Call) Return(b bool, err error) *MockDeviceWireless_GetPropertyReal_Call { + _c.Call.Return(b, err) return _c } @@ -1772,9 +1726,9 @@ func (_c *MockDeviceWireless_GetPropertyReal_Call) RunAndReturn(run func() (bool return _c } -// GetPropertyState provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyState() (gonetworkmanager.NmDeviceState, error) { - ret := _m.Called() +// GetPropertyState provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyState() (gonetworkmanager.NmDeviceState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyState") @@ -1782,21 +1736,19 @@ func (_m *MockDeviceWireless) GetPropertyState() (gonetworkmanager.NmDeviceState var r0 gonetworkmanager.NmDeviceState var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmDeviceState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmDeviceState); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmDeviceState) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1817,8 +1769,8 @@ func (_c *MockDeviceWireless_GetPropertyState_Call) Run(run func()) *MockDeviceW return _c } -func (_c *MockDeviceWireless_GetPropertyState_Call) Return(_a0 gonetworkmanager.NmDeviceState, _a1 error) *MockDeviceWireless_GetPropertyState_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyState_Call) Return(nmDeviceState gonetworkmanager.NmDeviceState, err error) *MockDeviceWireless_GetPropertyState_Call { + _c.Call.Return(nmDeviceState, err) return _c } @@ -1827,9 +1779,9 @@ func (_c *MockDeviceWireless_GetPropertyState_Call) RunAndReturn(run func() (gon return _c } -// GetPropertyUdi provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyUdi() (string, error) { - ret := _m.Called() +// GetPropertyUdi provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyUdi() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyUdi") @@ -1837,21 +1789,19 @@ func (_m *MockDeviceWireless) GetPropertyUdi() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1872,8 +1822,8 @@ func (_c *MockDeviceWireless_GetPropertyUdi_Call) Run(run func()) *MockDeviceWir return _c } -func (_c *MockDeviceWireless_GetPropertyUdi_Call) Return(_a0 string, _a1 error) *MockDeviceWireless_GetPropertyUdi_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyUdi_Call) Return(s string, err error) *MockDeviceWireless_GetPropertyUdi_Call { + _c.Call.Return(s, err) return _c } @@ -1882,9 +1832,9 @@ func (_c *MockDeviceWireless_GetPropertyUdi_Call) RunAndReturn(run func() (strin return _c } -// GetPropertyWirelessCapabilities provides a mock function with no fields -func (_m *MockDeviceWireless) GetPropertyWirelessCapabilities() (uint32, error) { - ret := _m.Called() +// GetPropertyWirelessCapabilities provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) GetPropertyWirelessCapabilities() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWirelessCapabilities") @@ -1892,21 +1842,19 @@ func (_m *MockDeviceWireless) GetPropertyWirelessCapabilities() (uint32, error) var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1927,8 +1875,8 @@ func (_c *MockDeviceWireless_GetPropertyWirelessCapabilities_Call) Run(run func( return _c } -func (_c *MockDeviceWireless_GetPropertyWirelessCapabilities_Call) Return(_a0 uint32, _a1 error) *MockDeviceWireless_GetPropertyWirelessCapabilities_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_GetPropertyWirelessCapabilities_Call) Return(v uint32, err error) *MockDeviceWireless_GetPropertyWirelessCapabilities_Call { + _c.Call.Return(v, err) return _c } @@ -1937,9 +1885,9 @@ func (_c *MockDeviceWireless_GetPropertyWirelessCapabilities_Call) RunAndReturn( return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockDeviceWireless) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -1947,23 +1895,21 @@ func (_m *MockDeviceWireless) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1984,8 +1930,8 @@ func (_c *MockDeviceWireless_MarshalJSON_Call) Run(run func()) *MockDeviceWirele return _c } -func (_c *MockDeviceWireless_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockDeviceWireless_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockDeviceWireless_MarshalJSON_Call) Return(bytes []byte, err error) *MockDeviceWireless_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -1994,21 +1940,20 @@ func (_c *MockDeviceWireless_MarshalJSON_Call) RunAndReturn(run func() ([]byte, return _c } -// Reapply provides a mock function with given fields: connection, versionId, flags -func (_m *MockDeviceWireless) Reapply(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error { - ret := _m.Called(connection, versionId, flags) +// Reapply provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) Reapply(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error { + ret := _mock.Called(connection, versionId, flags) if len(ret) == 0 { panic("no return value specified for Reapply") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, uint64, uint32) error); ok { - r0 = rf(connection, versionId, flags) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, uint64, uint32) error); ok { + r0 = returnFunc(connection, versionId, flags) } else { r0 = ret.Error(0) } - return r0 } @@ -2021,42 +1966,57 @@ type MockDeviceWireless_Reapply_Call struct { // - connection gonetworkmanager.Connection // - versionId uint64 // - flags uint32 -func (_e *MockDeviceWireless_Expecter) Reapply(connection interface{}, versionId interface{}, flags interface{}) *MockDeviceWireless_Reapply_Call { +func (_e *MockDeviceWireless_Expecter) Reapply(connection any, versionId any, flags any) *MockDeviceWireless_Reapply_Call { return &MockDeviceWireless_Reapply_Call{Call: _e.mock.On("Reapply", connection, versionId, flags)} } func (_c *MockDeviceWireless_Reapply_Call) Run(run func(connection gonetworkmanager.Connection, versionId uint64, flags uint32)) *MockDeviceWireless_Reapply_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Connection), args[1].(uint64), args[2].(uint32)) + var arg0 gonetworkmanager.Connection + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Connection) + } + var arg1 uint64 + if args[1] != nil { + arg1 = args[1].(uint64) + } + var arg2 uint32 + if args[2] != nil { + arg2 = args[2].(uint32) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockDeviceWireless_Reapply_Call) Return(_a0 error) *MockDeviceWireless_Reapply_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_Reapply_Call) Return(err error) *MockDeviceWireless_Reapply_Call { + _c.Call.Return(err) return _c } -func (_c *MockDeviceWireless_Reapply_Call) RunAndReturn(run func(gonetworkmanager.Connection, uint64, uint32) error) *MockDeviceWireless_Reapply_Call { +func (_c *MockDeviceWireless_Reapply_Call) RunAndReturn(run func(connection gonetworkmanager.Connection, versionId uint64, flags uint32) error) *MockDeviceWireless_Reapply_Call { _c.Call.Return(run) return _c } -// RequestScan provides a mock function with no fields -func (_m *MockDeviceWireless) RequestScan() error { - ret := _m.Called() +// RequestScan provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) RequestScan() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RequestScan") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -2077,8 +2037,8 @@ func (_c *MockDeviceWireless_RequestScan_Call) Run(run func()) *MockDeviceWirele return _c } -func (_c *MockDeviceWireless_RequestScan_Call) Return(_a0 error) *MockDeviceWireless_RequestScan_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_RequestScan_Call) Return(err error) *MockDeviceWireless_RequestScan_Call { + _c.Call.Return(err) return _c } @@ -2087,21 +2047,20 @@ func (_c *MockDeviceWireless_RequestScan_Call) RunAndReturn(run func() error) *M return _c } -// SetPropertyAutoConnect provides a mock function with given fields: _a0 -func (_m *MockDeviceWireless) SetPropertyAutoConnect(_a0 bool) error { - ret := _m.Called(_a0) +// SetPropertyAutoConnect provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) SetPropertyAutoConnect(b bool) error { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for SetPropertyAutoConnect") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(b) } else { r0 = ret.Error(0) } - return r0 } @@ -2111,43 +2070,48 @@ type MockDeviceWireless_SetPropertyAutoConnect_Call struct { } // SetPropertyAutoConnect is a helper method to define mock.On call -// - _a0 bool -func (_e *MockDeviceWireless_Expecter) SetPropertyAutoConnect(_a0 interface{}) *MockDeviceWireless_SetPropertyAutoConnect_Call { - return &MockDeviceWireless_SetPropertyAutoConnect_Call{Call: _e.mock.On("SetPropertyAutoConnect", _a0)} +// - b bool +func (_e *MockDeviceWireless_Expecter) SetPropertyAutoConnect(b any) *MockDeviceWireless_SetPropertyAutoConnect_Call { + return &MockDeviceWireless_SetPropertyAutoConnect_Call{Call: _e.mock.On("SetPropertyAutoConnect", b)} } -func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) Run(run func(_a0 bool)) *MockDeviceWireless_SetPropertyAutoConnect_Call { +func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) Run(run func(b bool)) *MockDeviceWireless_SetPropertyAutoConnect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) Return(_a0 error) *MockDeviceWireless_SetPropertyAutoConnect_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) Return(err error) *MockDeviceWireless_SetPropertyAutoConnect_Call { + _c.Call.Return(err) return _c } -func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) RunAndReturn(run func(bool) error) *MockDeviceWireless_SetPropertyAutoConnect_Call { +func (_c *MockDeviceWireless_SetPropertyAutoConnect_Call) RunAndReturn(run func(b bool) error) *MockDeviceWireless_SetPropertyAutoConnect_Call { _c.Call.Return(run) return _c } -// SetPropertyManaged provides a mock function with given fields: _a0 -func (_m *MockDeviceWireless) SetPropertyManaged(_a0 bool) error { - ret := _m.Called(_a0) +// SetPropertyManaged provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) SetPropertyManaged(b bool) error { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for SetPropertyManaged") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(b) } else { r0 = ret.Error(0) } - return r0 } @@ -2157,43 +2121,48 @@ type MockDeviceWireless_SetPropertyManaged_Call struct { } // SetPropertyManaged is a helper method to define mock.On call -// - _a0 bool -func (_e *MockDeviceWireless_Expecter) SetPropertyManaged(_a0 interface{}) *MockDeviceWireless_SetPropertyManaged_Call { - return &MockDeviceWireless_SetPropertyManaged_Call{Call: _e.mock.On("SetPropertyManaged", _a0)} +// - b bool +func (_e *MockDeviceWireless_Expecter) SetPropertyManaged(b any) *MockDeviceWireless_SetPropertyManaged_Call { + return &MockDeviceWireless_SetPropertyManaged_Call{Call: _e.mock.On("SetPropertyManaged", b)} } -func (_c *MockDeviceWireless_SetPropertyManaged_Call) Run(run func(_a0 bool)) *MockDeviceWireless_SetPropertyManaged_Call { +func (_c *MockDeviceWireless_SetPropertyManaged_Call) Run(run func(b bool)) *MockDeviceWireless_SetPropertyManaged_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockDeviceWireless_SetPropertyManaged_Call) Return(_a0 error) *MockDeviceWireless_SetPropertyManaged_Call { - _c.Call.Return(_a0) +func (_c *MockDeviceWireless_SetPropertyManaged_Call) Return(err error) *MockDeviceWireless_SetPropertyManaged_Call { + _c.Call.Return(err) return _c } -func (_c *MockDeviceWireless_SetPropertyManaged_Call) RunAndReturn(run func(bool) error) *MockDeviceWireless_SetPropertyManaged_Call { +func (_c *MockDeviceWireless_SetPropertyManaged_Call) RunAndReturn(run func(b bool) error) *MockDeviceWireless_SetPropertyManaged_Call { _c.Call.Return(run) return _c } -// SubscribeState provides a mock function with given fields: receiver, exit -func (_m *MockDeviceWireless) SubscribeState(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error { - ret := _m.Called(receiver, exit) +// SubscribeState provides a mock function for the type MockDeviceWireless +func (_mock *MockDeviceWireless) SubscribeState(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error { + ret := _mock.Called(receiver, exit) if len(ret) == 0 { panic("no return value specified for SubscribeState") } var r0 error - if rf, ok := ret.Get(0).(func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error); ok { - r0 = rf(receiver, exit) + if returnFunc, ok := ret.Get(0).(func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error); ok { + r0 = returnFunc(receiver, exit) } else { r0 = ret.Error(0) } - return r0 } @@ -2205,13 +2174,24 @@ type MockDeviceWireless_SubscribeState_Call struct { // SubscribeState is a helper method to define mock.On call // - receiver chan gonetworkmanager.DeviceStateChange // - exit chan struct{} -func (_e *MockDeviceWireless_Expecter) SubscribeState(receiver interface{}, exit interface{}) *MockDeviceWireless_SubscribeState_Call { +func (_e *MockDeviceWireless_Expecter) SubscribeState(receiver any, exit any) *MockDeviceWireless_SubscribeState_Call { return &MockDeviceWireless_SubscribeState_Call{Call: _e.mock.On("SubscribeState", receiver, exit)} } func (_c *MockDeviceWireless_SubscribeState_Call) Run(run func(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{})) *MockDeviceWireless_SubscribeState_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(chan gonetworkmanager.DeviceStateChange), args[1].(chan struct{})) + var arg0 chan gonetworkmanager.DeviceStateChange + if args[0] != nil { + arg0 = args[0].(chan gonetworkmanager.DeviceStateChange) + } + var arg1 chan struct{} + if args[1] != nil { + arg1 = args[1].(chan struct{}) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2221,21 +2201,7 @@ func (_c *MockDeviceWireless_SubscribeState_Call) Return(err error) *MockDeviceW return _c } -func (_c *MockDeviceWireless_SubscribeState_Call) RunAndReturn(run func(chan gonetworkmanager.DeviceStateChange, chan struct{}) error) *MockDeviceWireless_SubscribeState_Call { +func (_c *MockDeviceWireless_SubscribeState_Call) RunAndReturn(run func(receiver chan gonetworkmanager.DeviceStateChange, exit chan struct{}) error) *MockDeviceWireless_SubscribeState_Call { _c.Call.Return(run) return _c } - -// NewMockDeviceWireless creates a new instance of MockDeviceWireless. 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 NewMockDeviceWireless(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDeviceWireless { - mock := &MockDeviceWireless{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_IP4Config.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_IP4Config.go index 235be867..3e0bfa7e 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_IP4Config.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_IP4Config.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" + "github.com/Wifx/gonetworkmanager/v2" mock "github.com/stretchr/testify/mock" ) +// NewMockIP4Config creates a new instance of MockIP4Config. 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 NewMockIP4Config(t interface { + mock.TestingT + Cleanup(func()) +}) *MockIP4Config { + mock := &MockIP4Config{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockIP4Config is an autogenerated mock type for the IP4Config type type MockIP4Config struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *MockIP4Config) EXPECT() *MockIP4Config_Expecter { return &MockIP4Config_Expecter{mock: &_m.Mock} } -// GetPropertyAddressData provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyAddressData() ([]gonetworkmanager.IP4AddressData, error) { - ret := _m.Called() +// GetPropertyAddressData provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyAddressData() ([]gonetworkmanager.IP4AddressData, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAddressData") @@ -30,23 +46,21 @@ func (_m *MockIP4Config) GetPropertyAddressData() ([]gonetworkmanager.IP4Address var r0 []gonetworkmanager.IP4AddressData var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4AddressData, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4AddressData, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.IP4AddressData); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.IP4AddressData); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.IP4AddressData) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -67,8 +81,8 @@ func (_c *MockIP4Config_GetPropertyAddressData_Call) Run(run func()) *MockIP4Con return _c } -func (_c *MockIP4Config_GetPropertyAddressData_Call) Return(_a0 []gonetworkmanager.IP4AddressData, _a1 error) *MockIP4Config_GetPropertyAddressData_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyAddressData_Call) Return(iP4AddressDatas []gonetworkmanager.IP4AddressData, err error) *MockIP4Config_GetPropertyAddressData_Call { + _c.Call.Return(iP4AddressDatas, err) return _c } @@ -77,9 +91,9 @@ func (_c *MockIP4Config_GetPropertyAddressData_Call) RunAndReturn(run func() ([] return _c } -// GetPropertyAddresses provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyAddresses() ([]gonetworkmanager.IP4Address, error) { - ret := _m.Called() +// GetPropertyAddresses provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyAddresses() ([]gonetworkmanager.IP4Address, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAddresses") @@ -87,23 +101,21 @@ func (_m *MockIP4Config) GetPropertyAddresses() ([]gonetworkmanager.IP4Address, var r0 []gonetworkmanager.IP4Address var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4Address, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4Address, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.IP4Address); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.IP4Address); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.IP4Address) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -124,8 +136,8 @@ func (_c *MockIP4Config_GetPropertyAddresses_Call) Run(run func()) *MockIP4Confi return _c } -func (_c *MockIP4Config_GetPropertyAddresses_Call) Return(_a0 []gonetworkmanager.IP4Address, _a1 error) *MockIP4Config_GetPropertyAddresses_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyAddresses_Call) Return(iP4Addresss []gonetworkmanager.IP4Address, err error) *MockIP4Config_GetPropertyAddresses_Call { + _c.Call.Return(iP4Addresss, err) return _c } @@ -134,9 +146,9 @@ func (_c *MockIP4Config_GetPropertyAddresses_Call) RunAndReturn(run func() ([]go return _c } -// GetPropertyDnsOptions provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyDnsOptions() ([]string, error) { - ret := _m.Called() +// GetPropertyDnsOptions provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyDnsOptions() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDnsOptions") @@ -144,23 +156,21 @@ func (_m *MockIP4Config) GetPropertyDnsOptions() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -181,8 +191,8 @@ func (_c *MockIP4Config_GetPropertyDnsOptions_Call) Run(run func()) *MockIP4Conf return _c } -func (_c *MockIP4Config_GetPropertyDnsOptions_Call) Return(_a0 []string, _a1 error) *MockIP4Config_GetPropertyDnsOptions_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyDnsOptions_Call) Return(strings []string, err error) *MockIP4Config_GetPropertyDnsOptions_Call { + _c.Call.Return(strings, err) return _c } @@ -191,9 +201,9 @@ func (_c *MockIP4Config_GetPropertyDnsOptions_Call) RunAndReturn(run func() ([]s return _c } -// GetPropertyDnsPriority provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyDnsPriority() (uint32, error) { - ret := _m.Called() +// GetPropertyDnsPriority provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyDnsPriority() (uint32, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDnsPriority") @@ -201,21 +211,19 @@ func (_m *MockIP4Config) GetPropertyDnsPriority() (uint32, error) { var r0 uint32 var r1 error - if rf, ok := ret.Get(0).(func() (uint32, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() uint32); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -236,8 +244,8 @@ func (_c *MockIP4Config_GetPropertyDnsPriority_Call) Run(run func()) *MockIP4Con return _c } -func (_c *MockIP4Config_GetPropertyDnsPriority_Call) Return(_a0 uint32, _a1 error) *MockIP4Config_GetPropertyDnsPriority_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyDnsPriority_Call) Return(v uint32, err error) *MockIP4Config_GetPropertyDnsPriority_Call { + _c.Call.Return(v, err) return _c } @@ -246,9 +254,9 @@ func (_c *MockIP4Config_GetPropertyDnsPriority_Call) RunAndReturn(run func() (ui return _c } -// GetPropertyDomains provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyDomains() ([]string, error) { - ret := _m.Called() +// GetPropertyDomains provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyDomains() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDomains") @@ -256,23 +264,21 @@ func (_m *MockIP4Config) GetPropertyDomains() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -293,8 +299,8 @@ func (_c *MockIP4Config_GetPropertyDomains_Call) Run(run func()) *MockIP4Config_ return _c } -func (_c *MockIP4Config_GetPropertyDomains_Call) Return(_a0 []string, _a1 error) *MockIP4Config_GetPropertyDomains_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyDomains_Call) Return(strings []string, err error) *MockIP4Config_GetPropertyDomains_Call { + _c.Call.Return(strings, err) return _c } @@ -303,9 +309,9 @@ func (_c *MockIP4Config_GetPropertyDomains_Call) RunAndReturn(run func() ([]stri return _c } -// GetPropertyGateway provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyGateway() (string, error) { - ret := _m.Called() +// GetPropertyGateway provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyGateway() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyGateway") @@ -313,21 +319,19 @@ func (_m *MockIP4Config) GetPropertyGateway() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -348,8 +352,8 @@ func (_c *MockIP4Config_GetPropertyGateway_Call) Run(run func()) *MockIP4Config_ return _c } -func (_c *MockIP4Config_GetPropertyGateway_Call) Return(_a0 string, _a1 error) *MockIP4Config_GetPropertyGateway_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyGateway_Call) Return(s string, err error) *MockIP4Config_GetPropertyGateway_Call { + _c.Call.Return(s, err) return _c } @@ -358,9 +362,9 @@ func (_c *MockIP4Config_GetPropertyGateway_Call) RunAndReturn(run func() (string return _c } -// GetPropertyNameserverData provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyNameserverData() ([]gonetworkmanager.IP4NameserverData, error) { - ret := _m.Called() +// GetPropertyNameserverData provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyNameserverData() ([]gonetworkmanager.IP4NameserverData, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyNameserverData") @@ -368,23 +372,21 @@ func (_m *MockIP4Config) GetPropertyNameserverData() ([]gonetworkmanager.IP4Name var r0 []gonetworkmanager.IP4NameserverData var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4NameserverData, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4NameserverData, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.IP4NameserverData); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.IP4NameserverData); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.IP4NameserverData) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -405,8 +407,8 @@ func (_c *MockIP4Config_GetPropertyNameserverData_Call) Run(run func()) *MockIP4 return _c } -func (_c *MockIP4Config_GetPropertyNameserverData_Call) Return(_a0 []gonetworkmanager.IP4NameserverData, _a1 error) *MockIP4Config_GetPropertyNameserverData_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyNameserverData_Call) Return(iP4NameserverDatas []gonetworkmanager.IP4NameserverData, err error) *MockIP4Config_GetPropertyNameserverData_Call { + _c.Call.Return(iP4NameserverDatas, err) return _c } @@ -415,9 +417,9 @@ func (_c *MockIP4Config_GetPropertyNameserverData_Call) RunAndReturn(run func() return _c } -// GetPropertyNameservers provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyNameservers() ([]string, error) { - ret := _m.Called() +// GetPropertyNameservers provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyNameservers() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyNameservers") @@ -425,23 +427,21 @@ func (_m *MockIP4Config) GetPropertyNameservers() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -462,8 +462,8 @@ func (_c *MockIP4Config_GetPropertyNameservers_Call) Run(run func()) *MockIP4Con return _c } -func (_c *MockIP4Config_GetPropertyNameservers_Call) Return(_a0 []string, _a1 error) *MockIP4Config_GetPropertyNameservers_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyNameservers_Call) Return(strings []string, err error) *MockIP4Config_GetPropertyNameservers_Call { + _c.Call.Return(strings, err) return _c } @@ -472,9 +472,9 @@ func (_c *MockIP4Config_GetPropertyNameservers_Call) RunAndReturn(run func() ([] return _c } -// GetPropertyRouteData provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyRouteData() ([]gonetworkmanager.IP4RouteData, error) { - ret := _m.Called() +// GetPropertyRouteData provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyRouteData() ([]gonetworkmanager.IP4RouteData, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyRouteData") @@ -482,23 +482,21 @@ func (_m *MockIP4Config) GetPropertyRouteData() ([]gonetworkmanager.IP4RouteData var r0 []gonetworkmanager.IP4RouteData var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4RouteData, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4RouteData, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.IP4RouteData); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.IP4RouteData); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.IP4RouteData) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -519,8 +517,8 @@ func (_c *MockIP4Config_GetPropertyRouteData_Call) Run(run func()) *MockIP4Confi return _c } -func (_c *MockIP4Config_GetPropertyRouteData_Call) Return(_a0 []gonetworkmanager.IP4RouteData, _a1 error) *MockIP4Config_GetPropertyRouteData_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyRouteData_Call) Return(iP4RouteDatas []gonetworkmanager.IP4RouteData, err error) *MockIP4Config_GetPropertyRouteData_Call { + _c.Call.Return(iP4RouteDatas, err) return _c } @@ -529,9 +527,9 @@ func (_c *MockIP4Config_GetPropertyRouteData_Call) RunAndReturn(run func() ([]go return _c } -// GetPropertyRoutes provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyRoutes() ([]gonetworkmanager.IP4Route, error) { - ret := _m.Called() +// GetPropertyRoutes provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyRoutes() ([]gonetworkmanager.IP4Route, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyRoutes") @@ -539,23 +537,21 @@ func (_m *MockIP4Config) GetPropertyRoutes() ([]gonetworkmanager.IP4Route, error var r0 []gonetworkmanager.IP4Route var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4Route, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.IP4Route, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.IP4Route); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.IP4Route); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.IP4Route) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -576,8 +572,8 @@ func (_c *MockIP4Config_GetPropertyRoutes_Call) Run(run func()) *MockIP4Config_G return _c } -func (_c *MockIP4Config_GetPropertyRoutes_Call) Return(_a0 []gonetworkmanager.IP4Route, _a1 error) *MockIP4Config_GetPropertyRoutes_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyRoutes_Call) Return(iP4Routes []gonetworkmanager.IP4Route, err error) *MockIP4Config_GetPropertyRoutes_Call { + _c.Call.Return(iP4Routes, err) return _c } @@ -586,9 +582,9 @@ func (_c *MockIP4Config_GetPropertyRoutes_Call) RunAndReturn(run func() ([]gonet return _c } -// GetPropertySearches provides a mock function with no fields -func (_m *MockIP4Config) GetPropertySearches() ([]string, error) { - ret := _m.Called() +// GetPropertySearches provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertySearches() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertySearches") @@ -596,23 +592,21 @@ func (_m *MockIP4Config) GetPropertySearches() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -633,8 +627,8 @@ func (_c *MockIP4Config_GetPropertySearches_Call) Run(run func()) *MockIP4Config return _c } -func (_c *MockIP4Config_GetPropertySearches_Call) Return(_a0 []string, _a1 error) *MockIP4Config_GetPropertySearches_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertySearches_Call) Return(strings []string, err error) *MockIP4Config_GetPropertySearches_Call { + _c.Call.Return(strings, err) return _c } @@ -643,9 +637,9 @@ func (_c *MockIP4Config_GetPropertySearches_Call) RunAndReturn(run func() ([]str return _c } -// GetPropertyWinsServerData provides a mock function with no fields -func (_m *MockIP4Config) GetPropertyWinsServerData() ([]string, error) { - ret := _m.Called() +// GetPropertyWinsServerData provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) GetPropertyWinsServerData() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWinsServerData") @@ -653,23 +647,21 @@ func (_m *MockIP4Config) GetPropertyWinsServerData() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -690,8 +682,8 @@ func (_c *MockIP4Config_GetPropertyWinsServerData_Call) Run(run func()) *MockIP4 return _c } -func (_c *MockIP4Config_GetPropertyWinsServerData_Call) Return(_a0 []string, _a1 error) *MockIP4Config_GetPropertyWinsServerData_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_GetPropertyWinsServerData_Call) Return(strings []string, err error) *MockIP4Config_GetPropertyWinsServerData_Call { + _c.Call.Return(strings, err) return _c } @@ -700,9 +692,9 @@ func (_c *MockIP4Config_GetPropertyWinsServerData_Call) RunAndReturn(run func() return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockIP4Config) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockIP4Config +func (_mock *MockIP4Config) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -710,23 +702,21 @@ func (_m *MockIP4Config) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -747,8 +737,8 @@ func (_c *MockIP4Config_MarshalJSON_Call) Run(run func()) *MockIP4Config_Marshal return _c } -func (_c *MockIP4Config_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockIP4Config_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockIP4Config_MarshalJSON_Call) Return(bytes []byte, err error) *MockIP4Config_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -756,17 +746,3 @@ func (_c *MockIP4Config_MarshalJSON_Call) RunAndReturn(run func() ([]byte, error _c.Call.Return(run) return _c } - -// NewMockIP4Config creates a new instance of MockIP4Config. 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 NewMockIP4Config(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIP4Config { - mock := &MockIP4Config{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_NetworkManager.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_NetworkManager.go index e74ffb04..84845122 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_NetworkManager.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_NetworkManager.go @@ -1,14 +1,29 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" - dbus "github.com/godbus/dbus/v5" - + "github.com/Wifx/gonetworkmanager/v2" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockNetworkManager creates a new instance of MockNetworkManager. 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 NewMockNetworkManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNetworkManager { + mock := &MockNetworkManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockNetworkManager is an autogenerated mock type for the NetworkManager type type MockNetworkManager struct { mock.Mock @@ -22,9 +37,9 @@ func (_m *MockNetworkManager) EXPECT() *MockNetworkManager_Expecter { return &MockNetworkManager_Expecter{mock: &_m.Mock} } -// ActivateConnection provides a mock function with given fields: connection, device, specificObject -func (_m *MockNetworkManager) ActivateConnection(connection gonetworkmanager.Connection, device gonetworkmanager.Device, specificObject *dbus.Object) (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called(connection, device, specificObject) +// ActivateConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) ActivateConnection(connection gonetworkmanager.Connection, device gonetworkmanager.Device, specificObject *dbus.Object) (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called(connection, device, specificObject) if len(ret) == 0 { panic("no return value specified for ActivateConnection") @@ -32,23 +47,21 @@ func (_m *MockNetworkManager) ActivateConnection(connection gonetworkmanager.Con var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) (gonetworkmanager.ActiveConnection, error)); ok { - return rf(connection, device, specificObject) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc(connection, device, specificObject) } - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) gonetworkmanager.ActiveConnection); ok { - r0 = rf(connection, device, specificObject) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc(connection, device, specificObject) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) error); ok { - r1 = rf(connection, device, specificObject) + if returnFunc, ok := ret.Get(1).(func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) error); ok { + r1 = returnFunc(connection, device, specificObject) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -61,30 +74,46 @@ type MockNetworkManager_ActivateConnection_Call struct { // - connection gonetworkmanager.Connection // - device gonetworkmanager.Device // - specificObject *dbus.Object -func (_e *MockNetworkManager_Expecter) ActivateConnection(connection interface{}, device interface{}, specificObject interface{}) *MockNetworkManager_ActivateConnection_Call { +func (_e *MockNetworkManager_Expecter) ActivateConnection(connection any, device any, specificObject any) *MockNetworkManager_ActivateConnection_Call { return &MockNetworkManager_ActivateConnection_Call{Call: _e.mock.On("ActivateConnection", connection, device, specificObject)} } func (_c *MockNetworkManager_ActivateConnection_Call) Run(run func(connection gonetworkmanager.Connection, device gonetworkmanager.Device, specificObject *dbus.Object)) *MockNetworkManager_ActivateConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Connection), args[1].(gonetworkmanager.Device), args[2].(*dbus.Object)) + var arg0 gonetworkmanager.Connection + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Connection) + } + var arg1 gonetworkmanager.Device + if args[1] != nil { + arg1 = args[1].(gonetworkmanager.Device) + } + var arg2 *dbus.Object + if args[2] != nil { + arg2 = args[2].(*dbus.Object) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockNetworkManager_ActivateConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_ActivateConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_ActivateConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_ActivateConnection_Call { + _c.Call.Return(activeConnection, err) return _c } -func (_c *MockNetworkManager_ActivateConnection_Call) RunAndReturn(run func(gonetworkmanager.Connection, gonetworkmanager.Device, *dbus.Object) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_ActivateConnection_Call { +func (_c *MockNetworkManager_ActivateConnection_Call) RunAndReturn(run func(connection gonetworkmanager.Connection, device gonetworkmanager.Device, specificObject *dbus.Object) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_ActivateConnection_Call { _c.Call.Return(run) return _c } -// ActivateWirelessConnection provides a mock function with given fields: connection, device, accessPoint -func (_m *MockNetworkManager) ActivateWirelessConnection(connection gonetworkmanager.Connection, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called(connection, device, accessPoint) +// ActivateWirelessConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) ActivateWirelessConnection(connection gonetworkmanager.Connection, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called(connection, device, accessPoint) if len(ret) == 0 { panic("no return value specified for ActivateWirelessConnection") @@ -92,23 +121,21 @@ func (_m *MockNetworkManager) ActivateWirelessConnection(connection gonetworkman var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)); ok { - return rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc(connection, device, accessPoint) } - if rf, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) gonetworkmanager.ActiveConnection); ok { - r0 = rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc(connection, device, accessPoint) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) error); ok { - r1 = rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(1).(func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) error); ok { + r1 = returnFunc(connection, device, accessPoint) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -121,30 +148,46 @@ type MockNetworkManager_ActivateWirelessConnection_Call struct { // - connection gonetworkmanager.Connection // - device gonetworkmanager.Device // - accessPoint gonetworkmanager.AccessPoint -func (_e *MockNetworkManager_Expecter) ActivateWirelessConnection(connection interface{}, device interface{}, accessPoint interface{}) *MockNetworkManager_ActivateWirelessConnection_Call { +func (_e *MockNetworkManager_Expecter) ActivateWirelessConnection(connection any, device any, accessPoint any) *MockNetworkManager_ActivateWirelessConnection_Call { return &MockNetworkManager_ActivateWirelessConnection_Call{Call: _e.mock.On("ActivateWirelessConnection", connection, device, accessPoint)} } func (_c *MockNetworkManager_ActivateWirelessConnection_Call) Run(run func(connection gonetworkmanager.Connection, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint)) *MockNetworkManager_ActivateWirelessConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Connection), args[1].(gonetworkmanager.Device), args[2].(gonetworkmanager.AccessPoint)) + var arg0 gonetworkmanager.Connection + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Connection) + } + var arg1 gonetworkmanager.Device + if args[1] != nil { + arg1 = args[1].(gonetworkmanager.Device) + } + var arg2 gonetworkmanager.AccessPoint + if args[2] != nil { + arg2 = args[2].(gonetworkmanager.AccessPoint) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockNetworkManager_ActivateWirelessConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_ActivateWirelessConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_ActivateWirelessConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_ActivateWirelessConnection_Call { + _c.Call.Return(activeConnection, err) return _c } -func (_c *MockNetworkManager_ActivateWirelessConnection_Call) RunAndReturn(run func(gonetworkmanager.Connection, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_ActivateWirelessConnection_Call { +func (_c *MockNetworkManager_ActivateWirelessConnection_Call) RunAndReturn(run func(connection gonetworkmanager.Connection, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_ActivateWirelessConnection_Call { _c.Call.Return(run) return _c } -// AddAndActivateConnection provides a mock function with given fields: connection, device -func (_m *MockNetworkManager) AddAndActivateConnection(connection map[string]map[string]interface{}, device gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called(connection, device) +// AddAndActivateConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) AddAndActivateConnection(connection map[string]map[string]interface{}, device gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called(connection, device) if len(ret) == 0 { panic("no return value specified for AddAndActivateConnection") @@ -152,23 +195,21 @@ func (_m *MockNetworkManager) AddAndActivateConnection(connection map[string]map var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error)); ok { - return rf(connection, device) + if returnFunc, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc(connection, device) } - if rf, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device) gonetworkmanager.ActiveConnection); ok { - r0 = rf(connection, device) + if returnFunc, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device) gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc(connection, device) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func(map[string]map[string]interface{}, gonetworkmanager.Device) error); ok { - r1 = rf(connection, device) + if returnFunc, ok := ret.Get(1).(func(map[string]map[string]interface{}, gonetworkmanager.Device) error); ok { + r1 = returnFunc(connection, device) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -180,30 +221,41 @@ type MockNetworkManager_AddAndActivateConnection_Call struct { // AddAndActivateConnection is a helper method to define mock.On call // - connection map[string]map[string]interface{} // - device gonetworkmanager.Device -func (_e *MockNetworkManager_Expecter) AddAndActivateConnection(connection interface{}, device interface{}) *MockNetworkManager_AddAndActivateConnection_Call { +func (_e *MockNetworkManager_Expecter) AddAndActivateConnection(connection any, device any) *MockNetworkManager_AddAndActivateConnection_Call { return &MockNetworkManager_AddAndActivateConnection_Call{Call: _e.mock.On("AddAndActivateConnection", connection, device)} } func (_c *MockNetworkManager_AddAndActivateConnection_Call) Run(run func(connection map[string]map[string]interface{}, device gonetworkmanager.Device)) *MockNetworkManager_AddAndActivateConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(map[string]map[string]interface{}), args[1].(gonetworkmanager.Device)) + var arg0 map[string]map[string]interface{} + if args[0] != nil { + arg0 = args[0].(map[string]map[string]interface{}) + } + var arg1 gonetworkmanager.Device + if args[1] != nil { + arg1 = args[1].(gonetworkmanager.Device) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockNetworkManager_AddAndActivateConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_AddAndActivateConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_AddAndActivateConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_AddAndActivateConnection_Call { + _c.Call.Return(activeConnection, err) return _c } -func (_c *MockNetworkManager_AddAndActivateConnection_Call) RunAndReturn(run func(map[string]map[string]interface{}, gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_AddAndActivateConnection_Call { +func (_c *MockNetworkManager_AddAndActivateConnection_Call) RunAndReturn(run func(connection map[string]map[string]interface{}, device gonetworkmanager.Device) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_AddAndActivateConnection_Call { _c.Call.Return(run) return _c } -// AddAndActivateWirelessConnection provides a mock function with given fields: connection, device, accessPoint -func (_m *MockNetworkManager) AddAndActivateWirelessConnection(connection map[string]map[string]interface{}, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called(connection, device, accessPoint) +// AddAndActivateWirelessConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) AddAndActivateWirelessConnection(connection map[string]map[string]interface{}, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called(connection, device, accessPoint) if len(ret) == 0 { panic("no return value specified for AddAndActivateWirelessConnection") @@ -211,23 +263,21 @@ func (_m *MockNetworkManager) AddAndActivateWirelessConnection(connection map[st var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)); ok { - return rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc(connection, device, accessPoint) } - if rf, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) gonetworkmanager.ActiveConnection); ok { - r0 = rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(0).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc(connection, device, accessPoint) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) error); ok { - r1 = rf(connection, device, accessPoint) + if returnFunc, ok := ret.Get(1).(func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) error); ok { + r1 = returnFunc(connection, device, accessPoint) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -240,42 +290,57 @@ type MockNetworkManager_AddAndActivateWirelessConnection_Call struct { // - connection map[string]map[string]interface{} // - device gonetworkmanager.Device // - accessPoint gonetworkmanager.AccessPoint -func (_e *MockNetworkManager_Expecter) AddAndActivateWirelessConnection(connection interface{}, device interface{}, accessPoint interface{}) *MockNetworkManager_AddAndActivateWirelessConnection_Call { +func (_e *MockNetworkManager_Expecter) AddAndActivateWirelessConnection(connection any, device any, accessPoint any) *MockNetworkManager_AddAndActivateWirelessConnection_Call { return &MockNetworkManager_AddAndActivateWirelessConnection_Call{Call: _e.mock.On("AddAndActivateWirelessConnection", connection, device, accessPoint)} } func (_c *MockNetworkManager_AddAndActivateWirelessConnection_Call) Run(run func(connection map[string]map[string]interface{}, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint)) *MockNetworkManager_AddAndActivateWirelessConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(map[string]map[string]interface{}), args[1].(gonetworkmanager.Device), args[2].(gonetworkmanager.AccessPoint)) + var arg0 map[string]map[string]interface{} + if args[0] != nil { + arg0 = args[0].(map[string]map[string]interface{}) + } + var arg1 gonetworkmanager.Device + if args[1] != nil { + arg1 = args[1].(gonetworkmanager.Device) + } + var arg2 gonetworkmanager.AccessPoint + if args[2] != nil { + arg2 = args[2].(gonetworkmanager.AccessPoint) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockNetworkManager_AddAndActivateWirelessConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_AddAndActivateWirelessConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_AddAndActivateWirelessConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_AddAndActivateWirelessConnection_Call { + _c.Call.Return(activeConnection, err) return _c } -func (_c *MockNetworkManager_AddAndActivateWirelessConnection_Call) RunAndReturn(run func(map[string]map[string]interface{}, gonetworkmanager.Device, gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_AddAndActivateWirelessConnection_Call { +func (_c *MockNetworkManager_AddAndActivateWirelessConnection_Call) RunAndReturn(run func(connection map[string]map[string]interface{}, device gonetworkmanager.Device, accessPoint gonetworkmanager.AccessPoint) (gonetworkmanager.ActiveConnection, error)) *MockNetworkManager_AddAndActivateWirelessConnection_Call { _c.Call.Return(run) return _c } -// CheckConnectivity provides a mock function with no fields -func (_m *MockNetworkManager) CheckConnectivity() error { - ret := _m.Called() +// CheckConnectivity provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) CheckConnectivity() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for CheckConnectivity") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -296,8 +361,8 @@ func (_c *MockNetworkManager_CheckConnectivity_Call) Run(run func()) *MockNetwor return _c } -func (_c *MockNetworkManager_CheckConnectivity_Call) Return(_a0 error) *MockNetworkManager_CheckConnectivity_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_CheckConnectivity_Call) Return(err error) *MockNetworkManager_CheckConnectivity_Call { + _c.Call.Return(err) return _c } @@ -306,21 +371,20 @@ func (_c *MockNetworkManager_CheckConnectivity_Call) RunAndReturn(run func() err return _c } -// CheckpointAdjustRollbackTimeout provides a mock function with given fields: checkpoint, addTimeout -func (_m *MockNetworkManager) CheckpointAdjustRollbackTimeout(checkpoint gonetworkmanager.Checkpoint, addTimeout uint32) error { - ret := _m.Called(checkpoint, addTimeout) +// CheckpointAdjustRollbackTimeout provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) CheckpointAdjustRollbackTimeout(checkpoint gonetworkmanager.Checkpoint, addTimeout uint32) error { + ret := _mock.Called(checkpoint, addTimeout) if len(ret) == 0 { panic("no return value specified for CheckpointAdjustRollbackTimeout") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint, uint32) error); ok { - r0 = rf(checkpoint, addTimeout) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint, uint32) error); ok { + r0 = returnFunc(checkpoint, addTimeout) } else { r0 = ret.Error(0) } - return r0 } @@ -332,30 +396,41 @@ type MockNetworkManager_CheckpointAdjustRollbackTimeout_Call struct { // CheckpointAdjustRollbackTimeout is a helper method to define mock.On call // - checkpoint gonetworkmanager.Checkpoint // - addTimeout uint32 -func (_e *MockNetworkManager_Expecter) CheckpointAdjustRollbackTimeout(checkpoint interface{}, addTimeout interface{}) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { +func (_e *MockNetworkManager_Expecter) CheckpointAdjustRollbackTimeout(checkpoint any, addTimeout any) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { return &MockNetworkManager_CheckpointAdjustRollbackTimeout_Call{Call: _e.mock.On("CheckpointAdjustRollbackTimeout", checkpoint, addTimeout)} } func (_c *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call) Run(run func(checkpoint gonetworkmanager.Checkpoint, addTimeout uint32)) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Checkpoint), args[1].(uint32)) + var arg0 gonetworkmanager.Checkpoint + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Checkpoint) + } + var arg1 uint32 + if args[1] != nil { + arg1 = args[1].(uint32) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call) Return(_a0 error) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call) Return(err error) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call) RunAndReturn(run func(gonetworkmanager.Checkpoint, uint32) error) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { +func (_c *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call) RunAndReturn(run func(checkpoint gonetworkmanager.Checkpoint, addTimeout uint32) error) *MockNetworkManager_CheckpointAdjustRollbackTimeout_Call { _c.Call.Return(run) return _c } -// CheckpointCreate provides a mock function with given fields: devices, rollbackTimeout, flags -func (_m *MockNetworkManager) CheckpointCreate(devices []gonetworkmanager.Device, rollbackTimeout uint32, flags uint32) (gonetworkmanager.Checkpoint, error) { - ret := _m.Called(devices, rollbackTimeout, flags) +// CheckpointCreate provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) CheckpointCreate(devices []gonetworkmanager.Device, rollbackTimeout uint32, flags uint32) (gonetworkmanager.Checkpoint, error) { + ret := _mock.Called(devices, rollbackTimeout, flags) if len(ret) == 0 { panic("no return value specified for CheckpointCreate") @@ -363,23 +438,21 @@ func (_m *MockNetworkManager) CheckpointCreate(devices []gonetworkmanager.Device var r0 gonetworkmanager.Checkpoint var r1 error - if rf, ok := ret.Get(0).(func([]gonetworkmanager.Device, uint32, uint32) (gonetworkmanager.Checkpoint, error)); ok { - return rf(devices, rollbackTimeout, flags) + if returnFunc, ok := ret.Get(0).(func([]gonetworkmanager.Device, uint32, uint32) (gonetworkmanager.Checkpoint, error)); ok { + return returnFunc(devices, rollbackTimeout, flags) } - if rf, ok := ret.Get(0).(func([]gonetworkmanager.Device, uint32, uint32) gonetworkmanager.Checkpoint); ok { - r0 = rf(devices, rollbackTimeout, flags) + if returnFunc, ok := ret.Get(0).(func([]gonetworkmanager.Device, uint32, uint32) gonetworkmanager.Checkpoint); ok { + r0 = returnFunc(devices, rollbackTimeout, flags) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Checkpoint) } } - - if rf, ok := ret.Get(1).(func([]gonetworkmanager.Device, uint32, uint32) error); ok { - r1 = rf(devices, rollbackTimeout, flags) + if returnFunc, ok := ret.Get(1).(func([]gonetworkmanager.Device, uint32, uint32) error); ok { + r1 = returnFunc(devices, rollbackTimeout, flags) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -392,42 +465,57 @@ type MockNetworkManager_CheckpointCreate_Call struct { // - devices []gonetworkmanager.Device // - rollbackTimeout uint32 // - flags uint32 -func (_e *MockNetworkManager_Expecter) CheckpointCreate(devices interface{}, rollbackTimeout interface{}, flags interface{}) *MockNetworkManager_CheckpointCreate_Call { +func (_e *MockNetworkManager_Expecter) CheckpointCreate(devices any, rollbackTimeout any, flags any) *MockNetworkManager_CheckpointCreate_Call { return &MockNetworkManager_CheckpointCreate_Call{Call: _e.mock.On("CheckpointCreate", devices, rollbackTimeout, flags)} } func (_c *MockNetworkManager_CheckpointCreate_Call) Run(run func(devices []gonetworkmanager.Device, rollbackTimeout uint32, flags uint32)) *MockNetworkManager_CheckpointCreate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]gonetworkmanager.Device), args[1].(uint32), args[2].(uint32)) + var arg0 []gonetworkmanager.Device + if args[0] != nil { + arg0 = args[0].([]gonetworkmanager.Device) + } + var arg1 uint32 + if args[1] != nil { + arg1 = args[1].(uint32) + } + var arg2 uint32 + if args[2] != nil { + arg2 = args[2].(uint32) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockNetworkManager_CheckpointCreate_Call) Return(_a0 gonetworkmanager.Checkpoint, _a1 error) *MockNetworkManager_CheckpointCreate_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_CheckpointCreate_Call) Return(checkpoint gonetworkmanager.Checkpoint, err error) *MockNetworkManager_CheckpointCreate_Call { + _c.Call.Return(checkpoint, err) return _c } -func (_c *MockNetworkManager_CheckpointCreate_Call) RunAndReturn(run func([]gonetworkmanager.Device, uint32, uint32) (gonetworkmanager.Checkpoint, error)) *MockNetworkManager_CheckpointCreate_Call { +func (_c *MockNetworkManager_CheckpointCreate_Call) RunAndReturn(run func(devices []gonetworkmanager.Device, rollbackTimeout uint32, flags uint32) (gonetworkmanager.Checkpoint, error)) *MockNetworkManager_CheckpointCreate_Call { _c.Call.Return(run) return _c } -// CheckpointDestroy provides a mock function with given fields: checkpoint -func (_m *MockNetworkManager) CheckpointDestroy(checkpoint gonetworkmanager.Checkpoint) error { - ret := _m.Called(checkpoint) +// CheckpointDestroy provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) CheckpointDestroy(checkpoint gonetworkmanager.Checkpoint) error { + ret := _mock.Called(checkpoint) if len(ret) == 0 { panic("no return value specified for CheckpointDestroy") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) error); ok { - r0 = rf(checkpoint) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) error); ok { + r0 = returnFunc(checkpoint) } else { r0 = ret.Error(0) } - return r0 } @@ -438,30 +526,36 @@ type MockNetworkManager_CheckpointDestroy_Call struct { // CheckpointDestroy is a helper method to define mock.On call // - checkpoint gonetworkmanager.Checkpoint -func (_e *MockNetworkManager_Expecter) CheckpointDestroy(checkpoint interface{}) *MockNetworkManager_CheckpointDestroy_Call { +func (_e *MockNetworkManager_Expecter) CheckpointDestroy(checkpoint any) *MockNetworkManager_CheckpointDestroy_Call { return &MockNetworkManager_CheckpointDestroy_Call{Call: _e.mock.On("CheckpointDestroy", checkpoint)} } func (_c *MockNetworkManager_CheckpointDestroy_Call) Run(run func(checkpoint gonetworkmanager.Checkpoint)) *MockNetworkManager_CheckpointDestroy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Checkpoint)) + var arg0 gonetworkmanager.Checkpoint + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Checkpoint) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_CheckpointDestroy_Call) Return(_a0 error) *MockNetworkManager_CheckpointDestroy_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_CheckpointDestroy_Call) Return(err error) *MockNetworkManager_CheckpointDestroy_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_CheckpointDestroy_Call) RunAndReturn(run func(gonetworkmanager.Checkpoint) error) *MockNetworkManager_CheckpointDestroy_Call { +func (_c *MockNetworkManager_CheckpointDestroy_Call) RunAndReturn(run func(checkpoint gonetworkmanager.Checkpoint) error) *MockNetworkManager_CheckpointDestroy_Call { _c.Call.Return(run) return _c } -// CheckpointRollback provides a mock function with given fields: checkpoint -func (_m *MockNetworkManager) CheckpointRollback(checkpoint gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error) { - ret := _m.Called(checkpoint) +// CheckpointRollback provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) CheckpointRollback(checkpoint gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error) { + ret := _mock.Called(checkpoint) if len(ret) == 0 { panic("no return value specified for CheckpointRollback") @@ -469,23 +563,21 @@ func (_m *MockNetworkManager) CheckpointRollback(checkpoint gonetworkmanager.Che var r0 map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult var r1 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error)); ok { - return rf(checkpoint) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error)); ok { + return returnFunc(checkpoint) } - if rf, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult); ok { - r0 = rf(checkpoint) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.Checkpoint) map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult); ok { + r0 = returnFunc(checkpoint) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult) } } - - if rf, ok := ret.Get(1).(func(gonetworkmanager.Checkpoint) error); ok { - r1 = rf(checkpoint) + if returnFunc, ok := ret.Get(1).(func(gonetworkmanager.Checkpoint) error); ok { + r1 = returnFunc(checkpoint) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -496,13 +588,19 @@ type MockNetworkManager_CheckpointRollback_Call struct { // CheckpointRollback is a helper method to define mock.On call // - checkpoint gonetworkmanager.Checkpoint -func (_e *MockNetworkManager_Expecter) CheckpointRollback(checkpoint interface{}) *MockNetworkManager_CheckpointRollback_Call { +func (_e *MockNetworkManager_Expecter) CheckpointRollback(checkpoint any) *MockNetworkManager_CheckpointRollback_Call { return &MockNetworkManager_CheckpointRollback_Call{Call: _e.mock.On("CheckpointRollback", checkpoint)} } func (_c *MockNetworkManager_CheckpointRollback_Call) Run(run func(checkpoint gonetworkmanager.Checkpoint)) *MockNetworkManager_CheckpointRollback_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.Checkpoint)) + var arg0 gonetworkmanager.Checkpoint + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.Checkpoint) + } + run( + arg0, + ) }) return _c } @@ -512,26 +610,25 @@ func (_c *MockNetworkManager_CheckpointRollback_Call) Return(result map[dbus.Obj return _c } -func (_c *MockNetworkManager_CheckpointRollback_Call) RunAndReturn(run func(gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error)) *MockNetworkManager_CheckpointRollback_Call { +func (_c *MockNetworkManager_CheckpointRollback_Call) RunAndReturn(run func(checkpoint gonetworkmanager.Checkpoint) (map[dbus.ObjectPath]gonetworkmanager.NmRollbackResult, error)) *MockNetworkManager_CheckpointRollback_Call { _c.Call.Return(run) return _c } -// DeactivateConnection provides a mock function with given fields: connection -func (_m *MockNetworkManager) DeactivateConnection(connection gonetworkmanager.ActiveConnection) error { - ret := _m.Called(connection) +// DeactivateConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) DeactivateConnection(connection gonetworkmanager.ActiveConnection) error { + ret := _mock.Called(connection) if len(ret) == 0 { panic("no return value specified for DeactivateConnection") } var r0 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.ActiveConnection) error); ok { - r0 = rf(connection) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ActiveConnection) error); ok { + r0 = returnFunc(connection) } else { r0 = ret.Error(0) } - return r0 } @@ -542,42 +639,47 @@ type MockNetworkManager_DeactivateConnection_Call struct { // DeactivateConnection is a helper method to define mock.On call // - connection gonetworkmanager.ActiveConnection -func (_e *MockNetworkManager_Expecter) DeactivateConnection(connection interface{}) *MockNetworkManager_DeactivateConnection_Call { +func (_e *MockNetworkManager_Expecter) DeactivateConnection(connection any) *MockNetworkManager_DeactivateConnection_Call { return &MockNetworkManager_DeactivateConnection_Call{Call: _e.mock.On("DeactivateConnection", connection)} } func (_c *MockNetworkManager_DeactivateConnection_Call) Run(run func(connection gonetworkmanager.ActiveConnection)) *MockNetworkManager_DeactivateConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.ActiveConnection)) + var arg0 gonetworkmanager.ActiveConnection + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.ActiveConnection) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_DeactivateConnection_Call) Return(_a0 error) *MockNetworkManager_DeactivateConnection_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_DeactivateConnection_Call) Return(err error) *MockNetworkManager_DeactivateConnection_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_DeactivateConnection_Call) RunAndReturn(run func(gonetworkmanager.ActiveConnection) error) *MockNetworkManager_DeactivateConnection_Call { +func (_c *MockNetworkManager_DeactivateConnection_Call) RunAndReturn(run func(connection gonetworkmanager.ActiveConnection) error) *MockNetworkManager_DeactivateConnection_Call { _c.Call.Return(run) return _c } -// Enable provides a mock function with given fields: enableNDisable -func (_m *MockNetworkManager) Enable(enableNDisable bool) error { - ret := _m.Called(enableNDisable) +// Enable provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) Enable(enableNDisable bool) error { + ret := _mock.Called(enableNDisable) if len(ret) == 0 { panic("no return value specified for Enable") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(enableNDisable) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(enableNDisable) } else { r0 = ret.Error(0) } - return r0 } @@ -588,30 +690,36 @@ type MockNetworkManager_Enable_Call struct { // Enable is a helper method to define mock.On call // - enableNDisable bool -func (_e *MockNetworkManager_Expecter) Enable(enableNDisable interface{}) *MockNetworkManager_Enable_Call { +func (_e *MockNetworkManager_Expecter) Enable(enableNDisable any) *MockNetworkManager_Enable_Call { return &MockNetworkManager_Enable_Call{Call: _e.mock.On("Enable", enableNDisable)} } func (_c *MockNetworkManager_Enable_Call) Run(run func(enableNDisable bool)) *MockNetworkManager_Enable_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_Enable_Call) Return(_a0 error) *MockNetworkManager_Enable_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_Enable_Call) Return(err error) *MockNetworkManager_Enable_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_Enable_Call) RunAndReturn(run func(bool) error) *MockNetworkManager_Enable_Call { +func (_c *MockNetworkManager_Enable_Call) RunAndReturn(run func(enableNDisable bool) error) *MockNetworkManager_Enable_Call { _c.Call.Return(run) return _c } -// GetAllDevices provides a mock function with no fields -func (_m *MockNetworkManager) GetAllDevices() ([]gonetworkmanager.Device, error) { - ret := _m.Called() +// GetAllDevices provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetAllDevices() ([]gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetAllDevices") @@ -619,23 +727,21 @@ func (_m *MockNetworkManager) GetAllDevices() ([]gonetworkmanager.Device, error) var r0 []gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -656,8 +762,8 @@ func (_c *MockNetworkManager_GetAllDevices_Call) Run(run func()) *MockNetworkMan return _c } -func (_c *MockNetworkManager_GetAllDevices_Call) Return(_a0 []gonetworkmanager.Device, _a1 error) *MockNetworkManager_GetAllDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetAllDevices_Call) Return(devices []gonetworkmanager.Device, err error) *MockNetworkManager_GetAllDevices_Call { + _c.Call.Return(devices, err) return _c } @@ -666,9 +772,9 @@ func (_c *MockNetworkManager_GetAllDevices_Call) RunAndReturn(run func() ([]gone return _c } -// GetDeviceByIpIface provides a mock function with given fields: interfaceId -func (_m *MockNetworkManager) GetDeviceByIpIface(interfaceId string) (gonetworkmanager.Device, error) { - ret := _m.Called(interfaceId) +// GetDeviceByIpIface provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetDeviceByIpIface(interfaceId string) (gonetworkmanager.Device, error) { + ret := _mock.Called(interfaceId) if len(ret) == 0 { panic("no return value specified for GetDeviceByIpIface") @@ -676,23 +782,21 @@ func (_m *MockNetworkManager) GetDeviceByIpIface(interfaceId string) (gonetworkm var r0 gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func(string) (gonetworkmanager.Device, error)); ok { - return rf(interfaceId) + if returnFunc, ok := ret.Get(0).(func(string) (gonetworkmanager.Device, error)); ok { + return returnFunc(interfaceId) } - if rf, ok := ret.Get(0).(func(string) gonetworkmanager.Device); ok { - r0 = rf(interfaceId) + if returnFunc, ok := ret.Get(0).(func(string) gonetworkmanager.Device); ok { + r0 = returnFunc(interfaceId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(interfaceId) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(interfaceId) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -703,30 +807,36 @@ type MockNetworkManager_GetDeviceByIpIface_Call struct { // GetDeviceByIpIface is a helper method to define mock.On call // - interfaceId string -func (_e *MockNetworkManager_Expecter) GetDeviceByIpIface(interfaceId interface{}) *MockNetworkManager_GetDeviceByIpIface_Call { +func (_e *MockNetworkManager_Expecter) GetDeviceByIpIface(interfaceId any) *MockNetworkManager_GetDeviceByIpIface_Call { return &MockNetworkManager_GetDeviceByIpIface_Call{Call: _e.mock.On("GetDeviceByIpIface", interfaceId)} } func (_c *MockNetworkManager_GetDeviceByIpIface_Call) Run(run func(interfaceId string)) *MockNetworkManager_GetDeviceByIpIface_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_GetDeviceByIpIface_Call) Return(_a0 gonetworkmanager.Device, _a1 error) *MockNetworkManager_GetDeviceByIpIface_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetDeviceByIpIface_Call) Return(device gonetworkmanager.Device, err error) *MockNetworkManager_GetDeviceByIpIface_Call { + _c.Call.Return(device, err) return _c } -func (_c *MockNetworkManager_GetDeviceByIpIface_Call) RunAndReturn(run func(string) (gonetworkmanager.Device, error)) *MockNetworkManager_GetDeviceByIpIface_Call { +func (_c *MockNetworkManager_GetDeviceByIpIface_Call) RunAndReturn(run func(interfaceId string) (gonetworkmanager.Device, error)) *MockNetworkManager_GetDeviceByIpIface_Call { _c.Call.Return(run) return _c } -// GetDevices provides a mock function with no fields -func (_m *MockNetworkManager) GetDevices() ([]gonetworkmanager.Device, error) { - ret := _m.Called() +// GetDevices provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetDevices() ([]gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetDevices") @@ -734,23 +844,21 @@ func (_m *MockNetworkManager) GetDevices() ([]gonetworkmanager.Device, error) { var r0 []gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -771,8 +879,8 @@ func (_c *MockNetworkManager_GetDevices_Call) Run(run func()) *MockNetworkManage return _c } -func (_c *MockNetworkManager_GetDevices_Call) Return(_a0 []gonetworkmanager.Device, _a1 error) *MockNetworkManager_GetDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetDevices_Call) Return(devices []gonetworkmanager.Device, err error) *MockNetworkManager_GetDevices_Call { + _c.Call.Return(devices, err) return _c } @@ -781,9 +889,9 @@ func (_c *MockNetworkManager_GetDevices_Call) RunAndReturn(run func() ([]gonetwo return _c } -// GetPropertyActivatingConnection provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyActivatingConnection() (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called() +// GetPropertyActivatingConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyActivatingConnection() (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyActivatingConnection") @@ -791,23 +899,21 @@ func (_m *MockNetworkManager) GetPropertyActivatingConnection() (gonetworkmanage var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -828,8 +934,8 @@ func (_c *MockNetworkManager_GetPropertyActivatingConnection_Call) Run(run func( return _c } -func (_c *MockNetworkManager_GetPropertyActivatingConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_GetPropertyActivatingConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyActivatingConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_GetPropertyActivatingConnection_Call { + _c.Call.Return(activeConnection, err) return _c } @@ -838,9 +944,9 @@ func (_c *MockNetworkManager_GetPropertyActivatingConnection_Call) RunAndReturn( return _c } -// GetPropertyActiveConnections provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyActiveConnections() ([]gonetworkmanager.ActiveConnection, error) { - ret := _m.Called() +// GetPropertyActiveConnections provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyActiveConnections() ([]gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyActiveConnections") @@ -848,23 +954,21 @@ func (_m *MockNetworkManager) GetPropertyActiveConnections() ([]gonetworkmanager var r0 []gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.ActiveConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.ActiveConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -885,8 +989,8 @@ func (_c *MockNetworkManager_GetPropertyActiveConnections_Call) Run(run func()) return _c } -func (_c *MockNetworkManager_GetPropertyActiveConnections_Call) Return(_a0 []gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_GetPropertyActiveConnections_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyActiveConnections_Call) Return(activeConnections []gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_GetPropertyActiveConnections_Call { + _c.Call.Return(activeConnections, err) return _c } @@ -895,9 +999,9 @@ func (_c *MockNetworkManager_GetPropertyActiveConnections_Call) RunAndReturn(run return _c } -// GetPropertyAllDevices provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyAllDevices() ([]gonetworkmanager.Device, error) { - ret := _m.Called() +// GetPropertyAllDevices provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyAllDevices() ([]gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyAllDevices") @@ -905,23 +1009,21 @@ func (_m *MockNetworkManager) GetPropertyAllDevices() ([]gonetworkmanager.Device var r0 []gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -942,8 +1044,8 @@ func (_c *MockNetworkManager_GetPropertyAllDevices_Call) Run(run func()) *MockNe return _c } -func (_c *MockNetworkManager_GetPropertyAllDevices_Call) Return(_a0 []gonetworkmanager.Device, _a1 error) *MockNetworkManager_GetPropertyAllDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyAllDevices_Call) Return(devices []gonetworkmanager.Device, err error) *MockNetworkManager_GetPropertyAllDevices_Call { + _c.Call.Return(devices, err) return _c } @@ -952,9 +1054,9 @@ func (_c *MockNetworkManager_GetPropertyAllDevices_Call) RunAndReturn(run func() return _c } -// GetPropertyCapabilities provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyCapabilities() ([]gonetworkmanager.NmCapability, error) { - ret := _m.Called() +// GetPropertyCapabilities provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyCapabilities() ([]gonetworkmanager.NmCapability, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyCapabilities") @@ -962,23 +1064,21 @@ func (_m *MockNetworkManager) GetPropertyCapabilities() ([]gonetworkmanager.NmCa var r0 []gonetworkmanager.NmCapability var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.NmCapability, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.NmCapability, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.NmCapability); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.NmCapability); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.NmCapability) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -999,8 +1099,8 @@ func (_c *MockNetworkManager_GetPropertyCapabilities_Call) Run(run func()) *Mock return _c } -func (_c *MockNetworkManager_GetPropertyCapabilities_Call) Return(_a0 []gonetworkmanager.NmCapability, _a1 error) *MockNetworkManager_GetPropertyCapabilities_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyCapabilities_Call) Return(nmCapabilitys []gonetworkmanager.NmCapability, err error) *MockNetworkManager_GetPropertyCapabilities_Call { + _c.Call.Return(nmCapabilitys, err) return _c } @@ -1009,9 +1109,9 @@ func (_c *MockNetworkManager_GetPropertyCapabilities_Call) RunAndReturn(run func return _c } -// GetPropertyCheckpoints provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyCheckpoints() ([]gonetworkmanager.Checkpoint, error) { - ret := _m.Called() +// GetPropertyCheckpoints provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyCheckpoints() ([]gonetworkmanager.Checkpoint, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyCheckpoints") @@ -1019,23 +1119,21 @@ func (_m *MockNetworkManager) GetPropertyCheckpoints() ([]gonetworkmanager.Check var r0 []gonetworkmanager.Checkpoint var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Checkpoint, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Checkpoint, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Checkpoint); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Checkpoint); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Checkpoint) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1056,8 +1154,8 @@ func (_c *MockNetworkManager_GetPropertyCheckpoints_Call) Run(run func()) *MockN return _c } -func (_c *MockNetworkManager_GetPropertyCheckpoints_Call) Return(_a0 []gonetworkmanager.Checkpoint, _a1 error) *MockNetworkManager_GetPropertyCheckpoints_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyCheckpoints_Call) Return(checkpoints []gonetworkmanager.Checkpoint, err error) *MockNetworkManager_GetPropertyCheckpoints_Call { + _c.Call.Return(checkpoints, err) return _c } @@ -1066,9 +1164,9 @@ func (_c *MockNetworkManager_GetPropertyCheckpoints_Call) RunAndReturn(run func( return _c } -// GetPropertyConnectivity provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyConnectivity() (gonetworkmanager.NmConnectivity, error) { - ret := _m.Called() +// GetPropertyConnectivity provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyConnectivity() (gonetworkmanager.NmConnectivity, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyConnectivity") @@ -1076,21 +1174,19 @@ func (_m *MockNetworkManager) GetPropertyConnectivity() (gonetworkmanager.NmConn var r0 gonetworkmanager.NmConnectivity var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmConnectivity, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmConnectivity); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmConnectivity) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1111,8 +1207,8 @@ func (_c *MockNetworkManager_GetPropertyConnectivity_Call) Run(run func()) *Mock return _c } -func (_c *MockNetworkManager_GetPropertyConnectivity_Call) Return(_a0 gonetworkmanager.NmConnectivity, _a1 error) *MockNetworkManager_GetPropertyConnectivity_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyConnectivity_Call) Return(nmConnectivity gonetworkmanager.NmConnectivity, err error) *MockNetworkManager_GetPropertyConnectivity_Call { + _c.Call.Return(nmConnectivity, err) return _c } @@ -1121,9 +1217,9 @@ func (_c *MockNetworkManager_GetPropertyConnectivity_Call) RunAndReturn(run func return _c } -// GetPropertyConnectivityCheckAvailable provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyConnectivityCheckAvailable() (bool, error) { - ret := _m.Called() +// GetPropertyConnectivityCheckAvailable provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyConnectivityCheckAvailable() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyConnectivityCheckAvailable") @@ -1131,21 +1227,19 @@ func (_m *MockNetworkManager) GetPropertyConnectivityCheckAvailable() (bool, err var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1166,8 +1260,8 @@ func (_c *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call) Run(run return _c } -func (_c *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call { + _c.Call.Return(b, err) return _c } @@ -1176,9 +1270,9 @@ func (_c *MockNetworkManager_GetPropertyConnectivityCheckAvailable_Call) RunAndR return _c } -// GetPropertyConnectivityCheckEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyConnectivityCheckEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyConnectivityCheckEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyConnectivityCheckEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyConnectivityCheckEnabled") @@ -1186,21 +1280,19 @@ func (_m *MockNetworkManager) GetPropertyConnectivityCheckEnabled() (bool, error var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1221,8 +1313,8 @@ func (_c *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call) Run(run f return _c } -func (_c *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1231,9 +1323,9 @@ func (_c *MockNetworkManager_GetPropertyConnectivityCheckEnabled_Call) RunAndRet return _c } -// GetPropertyDevices provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyDevices() ([]gonetworkmanager.Device, error) { - ret := _m.Called() +// GetPropertyDevices provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyDevices() ([]gonetworkmanager.Device, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyDevices") @@ -1241,23 +1333,21 @@ func (_m *MockNetworkManager) GetPropertyDevices() ([]gonetworkmanager.Device, e var r0 []gonetworkmanager.Device var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Device, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Device); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Device) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1278,8 +1368,8 @@ func (_c *MockNetworkManager_GetPropertyDevices_Call) Run(run func()) *MockNetwo return _c } -func (_c *MockNetworkManager_GetPropertyDevices_Call) Return(_a0 []gonetworkmanager.Device, _a1 error) *MockNetworkManager_GetPropertyDevices_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyDevices_Call) Return(devices []gonetworkmanager.Device, err error) *MockNetworkManager_GetPropertyDevices_Call { + _c.Call.Return(devices, err) return _c } @@ -1288,9 +1378,9 @@ func (_c *MockNetworkManager_GetPropertyDevices_Call) RunAndReturn(run func() ([ return _c } -// GetPropertyMetered provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyMetered() (gonetworkmanager.NmMetered, error) { - ret := _m.Called() +// GetPropertyMetered provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyMetered() (gonetworkmanager.NmMetered, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyMetered") @@ -1298,21 +1388,19 @@ func (_m *MockNetworkManager) GetPropertyMetered() (gonetworkmanager.NmMetered, var r0 gonetworkmanager.NmMetered var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmMetered, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmMetered, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmMetered); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmMetered); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmMetered) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1333,8 +1421,8 @@ func (_c *MockNetworkManager_GetPropertyMetered_Call) Run(run func()) *MockNetwo return _c } -func (_c *MockNetworkManager_GetPropertyMetered_Call) Return(_a0 gonetworkmanager.NmMetered, _a1 error) *MockNetworkManager_GetPropertyMetered_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyMetered_Call) Return(nmMetered gonetworkmanager.NmMetered, err error) *MockNetworkManager_GetPropertyMetered_Call { + _c.Call.Return(nmMetered, err) return _c } @@ -1343,9 +1431,9 @@ func (_c *MockNetworkManager_GetPropertyMetered_Call) RunAndReturn(run func() (g return _c } -// GetPropertyNetworkingEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyNetworkingEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyNetworkingEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyNetworkingEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyNetworkingEnabled") @@ -1353,21 +1441,19 @@ func (_m *MockNetworkManager) GetPropertyNetworkingEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1388,8 +1474,8 @@ func (_c *MockNetworkManager_GetPropertyNetworkingEnabled_Call) Run(run func()) return _c } -func (_c *MockNetworkManager_GetPropertyNetworkingEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyNetworkingEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyNetworkingEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyNetworkingEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1398,9 +1484,9 @@ func (_c *MockNetworkManager_GetPropertyNetworkingEnabled_Call) RunAndReturn(run return _c } -// GetPropertyPrimaryConnection provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyPrimaryConnection() (gonetworkmanager.ActiveConnection, error) { - ret := _m.Called() +// GetPropertyPrimaryConnection provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyPrimaryConnection() (gonetworkmanager.ActiveConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyPrimaryConnection") @@ -1408,23 +1494,21 @@ func (_m *MockNetworkManager) GetPropertyPrimaryConnection() (gonetworkmanager.A var r0 gonetworkmanager.ActiveConnection var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ActiveConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ActiveConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.ActiveConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1445,8 +1529,8 @@ func (_c *MockNetworkManager_GetPropertyPrimaryConnection_Call) Run(run func()) return _c } -func (_c *MockNetworkManager_GetPropertyPrimaryConnection_Call) Return(_a0 gonetworkmanager.ActiveConnection, _a1 error) *MockNetworkManager_GetPropertyPrimaryConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyPrimaryConnection_Call) Return(activeConnection gonetworkmanager.ActiveConnection, err error) *MockNetworkManager_GetPropertyPrimaryConnection_Call { + _c.Call.Return(activeConnection, err) return _c } @@ -1455,9 +1539,9 @@ func (_c *MockNetworkManager_GetPropertyPrimaryConnection_Call) RunAndReturn(run return _c } -// GetPropertyPrimaryConnectionType provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyPrimaryConnectionType() (string, error) { - ret := _m.Called() +// GetPropertyPrimaryConnectionType provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyPrimaryConnectionType() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyPrimaryConnectionType") @@ -1465,21 +1549,19 @@ func (_m *MockNetworkManager) GetPropertyPrimaryConnectionType() (string, error) var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1500,8 +1582,8 @@ func (_c *MockNetworkManager_GetPropertyPrimaryConnectionType_Call) Run(run func return _c } -func (_c *MockNetworkManager_GetPropertyPrimaryConnectionType_Call) Return(_a0 string, _a1 error) *MockNetworkManager_GetPropertyPrimaryConnectionType_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyPrimaryConnectionType_Call) Return(s string, err error) *MockNetworkManager_GetPropertyPrimaryConnectionType_Call { + _c.Call.Return(s, err) return _c } @@ -1510,9 +1592,9 @@ func (_c *MockNetworkManager_GetPropertyPrimaryConnectionType_Call) RunAndReturn return _c } -// GetPropertyStartup provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyStartup() (bool, error) { - ret := _m.Called() +// GetPropertyStartup provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyStartup() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyStartup") @@ -1520,21 +1602,19 @@ func (_m *MockNetworkManager) GetPropertyStartup() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1555,8 +1635,8 @@ func (_c *MockNetworkManager_GetPropertyStartup_Call) Run(run func()) *MockNetwo return _c } -func (_c *MockNetworkManager_GetPropertyStartup_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyStartup_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyStartup_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyStartup_Call { + _c.Call.Return(b, err) return _c } @@ -1565,9 +1645,9 @@ func (_c *MockNetworkManager_GetPropertyStartup_Call) RunAndReturn(run func() (b return _c } -// GetPropertyState provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyState() (gonetworkmanager.NmState, error) { - ret := _m.Called() +// GetPropertyState provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyState() (gonetworkmanager.NmState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyState") @@ -1575,21 +1655,19 @@ func (_m *MockNetworkManager) GetPropertyState() (gonetworkmanager.NmState, erro var r0 gonetworkmanager.NmState var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmState); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmState) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1610,8 +1688,8 @@ func (_c *MockNetworkManager_GetPropertyState_Call) Run(run func()) *MockNetwork return _c } -func (_c *MockNetworkManager_GetPropertyState_Call) Return(_a0 gonetworkmanager.NmState, _a1 error) *MockNetworkManager_GetPropertyState_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyState_Call) Return(nmState gonetworkmanager.NmState, err error) *MockNetworkManager_GetPropertyState_Call { + _c.Call.Return(nmState, err) return _c } @@ -1620,9 +1698,9 @@ func (_c *MockNetworkManager_GetPropertyState_Call) RunAndReturn(run func() (gon return _c } -// GetPropertyVersion provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyVersion() (string, error) { - ret := _m.Called() +// GetPropertyVersion provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyVersion() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyVersion") @@ -1630,21 +1708,19 @@ func (_m *MockNetworkManager) GetPropertyVersion() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1665,8 +1741,8 @@ func (_c *MockNetworkManager_GetPropertyVersion_Call) Run(run func()) *MockNetwo return _c } -func (_c *MockNetworkManager_GetPropertyVersion_Call) Return(_a0 string, _a1 error) *MockNetworkManager_GetPropertyVersion_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyVersion_Call) Return(s string, err error) *MockNetworkManager_GetPropertyVersion_Call { + _c.Call.Return(s, err) return _c } @@ -1675,9 +1751,9 @@ func (_c *MockNetworkManager_GetPropertyVersion_Call) RunAndReturn(run func() (s return _c } -// GetPropertyWimaxEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWimaxEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWimaxEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWimaxEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWimaxEnabled") @@ -1685,21 +1761,19 @@ func (_m *MockNetworkManager) GetPropertyWimaxEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1720,8 +1794,8 @@ func (_c *MockNetworkManager_GetPropertyWimaxEnabled_Call) Run(run func()) *Mock return _c } -func (_c *MockNetworkManager_GetPropertyWimaxEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWimaxEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWimaxEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWimaxEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1730,9 +1804,9 @@ func (_c *MockNetworkManager_GetPropertyWimaxEnabled_Call) RunAndReturn(run func return _c } -// GetPropertyWimaxHardwareEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWimaxHardwareEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWimaxHardwareEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWimaxHardwareEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWimaxHardwareEnabled") @@ -1740,21 +1814,19 @@ func (_m *MockNetworkManager) GetPropertyWimaxHardwareEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1775,8 +1847,8 @@ func (_c *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call) Run(run func( return _c } -func (_c *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1785,9 +1857,9 @@ func (_c *MockNetworkManager_GetPropertyWimaxHardwareEnabled_Call) RunAndReturn( return _c } -// GetPropertyWirelessEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWirelessEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWirelessEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWirelessEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWirelessEnabled") @@ -1795,21 +1867,19 @@ func (_m *MockNetworkManager) GetPropertyWirelessEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1830,8 +1900,8 @@ func (_c *MockNetworkManager_GetPropertyWirelessEnabled_Call) Run(run func()) *M return _c } -func (_c *MockNetworkManager_GetPropertyWirelessEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWirelessEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWirelessEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWirelessEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1840,9 +1910,9 @@ func (_c *MockNetworkManager_GetPropertyWirelessEnabled_Call) RunAndReturn(run f return _c } -// GetPropertyWirelessHardwareEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWirelessHardwareEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWirelessHardwareEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWirelessHardwareEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWirelessHardwareEnabled") @@ -1850,21 +1920,19 @@ func (_m *MockNetworkManager) GetPropertyWirelessHardwareEnabled() (bool, error) var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1885,8 +1953,8 @@ func (_c *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call) Run(run fu return _c } -func (_c *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1895,9 +1963,9 @@ func (_c *MockNetworkManager_GetPropertyWirelessHardwareEnabled_Call) RunAndRetu return _c } -// GetPropertyWwanEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWwanEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWwanEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWwanEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWwanEnabled") @@ -1905,21 +1973,19 @@ func (_m *MockNetworkManager) GetPropertyWwanEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1940,8 +2006,8 @@ func (_c *MockNetworkManager_GetPropertyWwanEnabled_Call) Run(run func()) *MockN return _c } -func (_c *MockNetworkManager_GetPropertyWwanEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWwanEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWwanEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWwanEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1950,9 +2016,9 @@ func (_c *MockNetworkManager_GetPropertyWwanEnabled_Call) RunAndReturn(run func( return _c } -// GetPropertyWwanHardwareEnabled provides a mock function with no fields -func (_m *MockNetworkManager) GetPropertyWwanHardwareEnabled() (bool, error) { - ret := _m.Called() +// GetPropertyWwanHardwareEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) GetPropertyWwanHardwareEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyWwanHardwareEnabled") @@ -1960,21 +2026,19 @@ func (_m *MockNetworkManager) GetPropertyWwanHardwareEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1995,8 +2059,8 @@ func (_c *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call) Run(run func() return _c } -func (_c *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call) Return(_a0 bool, _a1 error) *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call) Return(b bool, err error) *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -2005,9 +2069,9 @@ func (_c *MockNetworkManager_GetPropertyWwanHardwareEnabled_Call) RunAndReturn(r return _c } -// MarshalJSON provides a mock function with no fields -func (_m *MockNetworkManager) MarshalJSON() ([]byte, error) { - ret := _m.Called() +// MarshalJSON provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) MarshalJSON() ([]byte, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for MarshalJSON") @@ -2015,23 +2079,21 @@ func (_m *MockNetworkManager) MarshalJSON() ([]byte, error) { var r0 []byte var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []byte); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2052,8 +2114,8 @@ func (_c *MockNetworkManager_MarshalJSON_Call) Run(run func()) *MockNetworkManag return _c } -func (_c *MockNetworkManager_MarshalJSON_Call) Return(_a0 []byte, _a1 error) *MockNetworkManager_MarshalJSON_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_MarshalJSON_Call) Return(bytes []byte, err error) *MockNetworkManager_MarshalJSON_Call { + _c.Call.Return(bytes, err) return _c } @@ -2062,21 +2124,20 @@ func (_c *MockNetworkManager_MarshalJSON_Call) RunAndReturn(run func() ([]byte, return _c } -// Reload provides a mock function with given fields: flags -func (_m *MockNetworkManager) Reload(flags uint32) error { - ret := _m.Called(flags) +// Reload provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) Reload(flags uint32) error { + ret := _mock.Called(flags) if len(ret) == 0 { panic("no return value specified for Reload") } var r0 error - if rf, ok := ret.Get(0).(func(uint32) error); ok { - r0 = rf(flags) + if returnFunc, ok := ret.Get(0).(func(uint32) error); ok { + r0 = returnFunc(flags) } else { r0 = ret.Error(0) } - return r0 } @@ -2087,42 +2148,47 @@ type MockNetworkManager_Reload_Call struct { // Reload is a helper method to define mock.On call // - flags uint32 -func (_e *MockNetworkManager_Expecter) Reload(flags interface{}) *MockNetworkManager_Reload_Call { +func (_e *MockNetworkManager_Expecter) Reload(flags any) *MockNetworkManager_Reload_Call { return &MockNetworkManager_Reload_Call{Call: _e.mock.On("Reload", flags)} } func (_c *MockNetworkManager_Reload_Call) Run(run func(flags uint32)) *MockNetworkManager_Reload_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) + var arg0 uint32 + if args[0] != nil { + arg0 = args[0].(uint32) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_Reload_Call) Return(_a0 error) *MockNetworkManager_Reload_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_Reload_Call) Return(err error) *MockNetworkManager_Reload_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_Reload_Call) RunAndReturn(run func(uint32) error) *MockNetworkManager_Reload_Call { +func (_c *MockNetworkManager_Reload_Call) RunAndReturn(run func(flags uint32) error) *MockNetworkManager_Reload_Call { _c.Call.Return(run) return _c } -// SetPropertyWirelessEnabled provides a mock function with given fields: _a0 -func (_m *MockNetworkManager) SetPropertyWirelessEnabled(_a0 bool) error { - ret := _m.Called(_a0) +// SetPropertyWirelessEnabled provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) SetPropertyWirelessEnabled(b bool) error { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for SetPropertyWirelessEnabled") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(b) } else { r0 = ret.Error(0) } - return r0 } @@ -2132,43 +2198,48 @@ type MockNetworkManager_SetPropertyWirelessEnabled_Call struct { } // SetPropertyWirelessEnabled is a helper method to define mock.On call -// - _a0 bool -func (_e *MockNetworkManager_Expecter) SetPropertyWirelessEnabled(_a0 interface{}) *MockNetworkManager_SetPropertyWirelessEnabled_Call { - return &MockNetworkManager_SetPropertyWirelessEnabled_Call{Call: _e.mock.On("SetPropertyWirelessEnabled", _a0)} +// - b bool +func (_e *MockNetworkManager_Expecter) SetPropertyWirelessEnabled(b any) *MockNetworkManager_SetPropertyWirelessEnabled_Call { + return &MockNetworkManager_SetPropertyWirelessEnabled_Call{Call: _e.mock.On("SetPropertyWirelessEnabled", b)} } -func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) Run(run func(_a0 bool)) *MockNetworkManager_SetPropertyWirelessEnabled_Call { +func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) Run(run func(b bool)) *MockNetworkManager_SetPropertyWirelessEnabled_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) Return(_a0 error) *MockNetworkManager_SetPropertyWirelessEnabled_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) Return(err error) *MockNetworkManager_SetPropertyWirelessEnabled_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) RunAndReturn(run func(bool) error) *MockNetworkManager_SetPropertyWirelessEnabled_Call { +func (_c *MockNetworkManager_SetPropertyWirelessEnabled_Call) RunAndReturn(run func(b bool) error) *MockNetworkManager_SetPropertyWirelessEnabled_Call { _c.Call.Return(run) return _c } -// Sleep provides a mock function with given fields: sleepNWake -func (_m *MockNetworkManager) Sleep(sleepNWake bool) error { - ret := _m.Called(sleepNWake) +// Sleep provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) Sleep(sleepNWake bool) error { + ret := _mock.Called(sleepNWake) if len(ret) == 0 { panic("no return value specified for Sleep") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(sleepNWake) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(sleepNWake) } else { r0 = ret.Error(0) } - return r0 } @@ -2179,30 +2250,36 @@ type MockNetworkManager_Sleep_Call struct { // Sleep is a helper method to define mock.On call // - sleepNWake bool -func (_e *MockNetworkManager_Expecter) Sleep(sleepNWake interface{}) *MockNetworkManager_Sleep_Call { +func (_e *MockNetworkManager_Expecter) Sleep(sleepNWake any) *MockNetworkManager_Sleep_Call { return &MockNetworkManager_Sleep_Call{Call: _e.mock.On("Sleep", sleepNWake)} } func (_c *MockNetworkManager_Sleep_Call) Run(run func(sleepNWake bool)) *MockNetworkManager_Sleep_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockNetworkManager_Sleep_Call) Return(_a0 error) *MockNetworkManager_Sleep_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_Sleep_Call) Return(err error) *MockNetworkManager_Sleep_Call { + _c.Call.Return(err) return _c } -func (_c *MockNetworkManager_Sleep_Call) RunAndReturn(run func(bool) error) *MockNetworkManager_Sleep_Call { +func (_c *MockNetworkManager_Sleep_Call) RunAndReturn(run func(sleepNWake bool) error) *MockNetworkManager_Sleep_Call { _c.Call.Return(run) return _c } -// State provides a mock function with no fields -func (_m *MockNetworkManager) State() (gonetworkmanager.NmState, error) { - ret := _m.Called() +// State provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) State() (gonetworkmanager.NmState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for State") @@ -2210,21 +2287,19 @@ func (_m *MockNetworkManager) State() (gonetworkmanager.NmState, error) { var r0 gonetworkmanager.NmState var r1 error - if rf, ok := ret.Get(0).(func() (gonetworkmanager.NmState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.NmState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() gonetworkmanager.NmState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.NmState); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(gonetworkmanager.NmState) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2245,8 +2320,8 @@ func (_c *MockNetworkManager_State_Call) Run(run func()) *MockNetworkManager_Sta return _c } -func (_c *MockNetworkManager_State_Call) Return(_a0 gonetworkmanager.NmState, _a1 error) *MockNetworkManager_State_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockNetworkManager_State_Call) Return(nmState gonetworkmanager.NmState, err error) *MockNetworkManager_State_Call { + _c.Call.Return(nmState, err) return _c } @@ -2255,23 +2330,22 @@ func (_c *MockNetworkManager_State_Call) RunAndReturn(run func() (gonetworkmanag return _c } -// Subscribe provides a mock function with no fields -func (_m *MockNetworkManager) Subscribe() <-chan *dbus.Signal { - ret := _m.Called() +// Subscribe provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) Subscribe() <-chan *dbus.Signal { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Subscribe") } var r0 <-chan *dbus.Signal - if rf, ok := ret.Get(0).(func() <-chan *dbus.Signal); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() <-chan *dbus.Signal); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan *dbus.Signal) } } - return r0 } @@ -2292,8 +2366,8 @@ func (_c *MockNetworkManager_Subscribe_Call) Run(run func()) *MockNetworkManager return _c } -func (_c *MockNetworkManager_Subscribe_Call) Return(_a0 <-chan *dbus.Signal) *MockNetworkManager_Subscribe_Call { - _c.Call.Return(_a0) +func (_c *MockNetworkManager_Subscribe_Call) Return(signalCh <-chan *dbus.Signal) *MockNetworkManager_Subscribe_Call { + _c.Call.Return(signalCh) return _c } @@ -2302,9 +2376,10 @@ func (_c *MockNetworkManager_Subscribe_Call) RunAndReturn(run func() <-chan *dbu return _c } -// Unsubscribe provides a mock function with no fields -func (_m *MockNetworkManager) Unsubscribe() { - _m.Called() +// Unsubscribe provides a mock function for the type MockNetworkManager +func (_mock *MockNetworkManager) Unsubscribe() { + _mock.Called() + return } // MockNetworkManager_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' @@ -2333,17 +2408,3 @@ func (_c *MockNetworkManager_Unsubscribe_Call) RunAndReturn(run func()) *MockNet _c.Run(run) return _c } - -// NewMockNetworkManager creates a new instance of MockNetworkManager. 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 NewMockNetworkManager(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNetworkManager { - mock := &MockNetworkManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Settings.go b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Settings.go index 20f488ef..24988144 100644 --- a/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Settings.go +++ b/core/internal/mocks/github.com/Wifx/gonetworkmanager/v2/mock_Settings.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package gonetworkmanager import ( - gonetworkmanager "github.com/Wifx/gonetworkmanager/v2" + "github.com/Wifx/gonetworkmanager/v2" mock "github.com/stretchr/testify/mock" ) +// NewMockSettings creates a new instance of MockSettings. 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 NewMockSettings(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSettings { + mock := &MockSettings{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockSettings is an autogenerated mock type for the Settings type type MockSettings struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *MockSettings) EXPECT() *MockSettings_Expecter { return &MockSettings_Expecter{mock: &_m.Mock} } -// AddConnection provides a mock function with given fields: settings -func (_m *MockSettings) AddConnection(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error) { - ret := _m.Called(settings) +// AddConnection provides a mock function for the type MockSettings +func (_mock *MockSettings) AddConnection(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error) { + ret := _mock.Called(settings) if len(ret) == 0 { panic("no return value specified for AddConnection") @@ -30,23 +46,21 @@ func (_m *MockSettings) AddConnection(settings gonetworkmanager.ConnectionSettin var r0 gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok { - return rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok { + return returnFunc(settings) } - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok { - r0 = rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok { + r0 = returnFunc(settings) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func(gonetworkmanager.ConnectionSettings) error); ok { - r1 = rf(settings) + if returnFunc, ok := ret.Get(1).(func(gonetworkmanager.ConnectionSettings) error); ok { + r1 = returnFunc(settings) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -57,30 +71,36 @@ type MockSettings_AddConnection_Call struct { // AddConnection is a helper method to define mock.On call // - settings gonetworkmanager.ConnectionSettings -func (_e *MockSettings_Expecter) AddConnection(settings interface{}) *MockSettings_AddConnection_Call { +func (_e *MockSettings_Expecter) AddConnection(settings any) *MockSettings_AddConnection_Call { return &MockSettings_AddConnection_Call{Call: _e.mock.On("AddConnection", settings)} } func (_c *MockSettings_AddConnection_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockSettings_AddConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.ConnectionSettings)) + var arg0 gonetworkmanager.ConnectionSettings + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.ConnectionSettings) + } + run( + arg0, + ) }) return _c } -func (_c *MockSettings_AddConnection_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_AddConnection_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_AddConnection_Call) Return(connection gonetworkmanager.Connection, err error) *MockSettings_AddConnection_Call { + _c.Call.Return(connection, err) return _c } -func (_c *MockSettings_AddConnection_Call) RunAndReturn(run func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)) *MockSettings_AddConnection_Call { +func (_c *MockSettings_AddConnection_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)) *MockSettings_AddConnection_Call { _c.Call.Return(run) return _c } -// AddConnectionUnsaved provides a mock function with given fields: settings -func (_m *MockSettings) AddConnectionUnsaved(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error) { - ret := _m.Called(settings) +// AddConnectionUnsaved provides a mock function for the type MockSettings +func (_mock *MockSettings) AddConnectionUnsaved(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error) { + ret := _mock.Called(settings) if len(ret) == 0 { panic("no return value specified for AddConnectionUnsaved") @@ -88,23 +108,21 @@ func (_m *MockSettings) AddConnectionUnsaved(settings gonetworkmanager.Connectio var r0 gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok { - return rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok { + return returnFunc(settings) } - if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok { - r0 = rf(settings) + if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok { + r0 = returnFunc(settings) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func(gonetworkmanager.ConnectionSettings) error); ok { - r1 = rf(settings) + if returnFunc, ok := ret.Get(1).(func(gonetworkmanager.ConnectionSettings) error); ok { + r1 = returnFunc(settings) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -115,30 +133,36 @@ type MockSettings_AddConnectionUnsaved_Call struct { // AddConnectionUnsaved is a helper method to define mock.On call // - settings gonetworkmanager.ConnectionSettings -func (_e *MockSettings_Expecter) AddConnectionUnsaved(settings interface{}) *MockSettings_AddConnectionUnsaved_Call { +func (_e *MockSettings_Expecter) AddConnectionUnsaved(settings any) *MockSettings_AddConnectionUnsaved_Call { return &MockSettings_AddConnectionUnsaved_Call{Call: _e.mock.On("AddConnectionUnsaved", settings)} } func (_c *MockSettings_AddConnectionUnsaved_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockSettings_AddConnectionUnsaved_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(gonetworkmanager.ConnectionSettings)) + var arg0 gonetworkmanager.ConnectionSettings + if args[0] != nil { + arg0 = args[0].(gonetworkmanager.ConnectionSettings) + } + run( + arg0, + ) }) return _c } -func (_c *MockSettings_AddConnectionUnsaved_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_AddConnectionUnsaved_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_AddConnectionUnsaved_Call) Return(connection gonetworkmanager.Connection, err error) *MockSettings_AddConnectionUnsaved_Call { + _c.Call.Return(connection, err) return _c } -func (_c *MockSettings_AddConnectionUnsaved_Call) RunAndReturn(run func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)) *MockSettings_AddConnectionUnsaved_Call { +func (_c *MockSettings_AddConnectionUnsaved_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)) *MockSettings_AddConnectionUnsaved_Call { _c.Call.Return(run) return _c } -// GetConnectionByUUID provides a mock function with given fields: uuid -func (_m *MockSettings) GetConnectionByUUID(uuid string) (gonetworkmanager.Connection, error) { - ret := _m.Called(uuid) +// GetConnectionByUUID provides a mock function for the type MockSettings +func (_mock *MockSettings) GetConnectionByUUID(uuid string) (gonetworkmanager.Connection, error) { + ret := _mock.Called(uuid) if len(ret) == 0 { panic("no return value specified for GetConnectionByUUID") @@ -146,23 +170,21 @@ func (_m *MockSettings) GetConnectionByUUID(uuid string) (gonetworkmanager.Conne var r0 gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func(string) (gonetworkmanager.Connection, error)); ok { - return rf(uuid) + if returnFunc, ok := ret.Get(0).(func(string) (gonetworkmanager.Connection, error)); ok { + return returnFunc(uuid) } - if rf, ok := ret.Get(0).(func(string) gonetworkmanager.Connection); ok { - r0 = rf(uuid) + if returnFunc, ok := ret.Get(0).(func(string) gonetworkmanager.Connection); ok { + r0 = returnFunc(uuid) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(uuid) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(uuid) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -173,30 +195,36 @@ type MockSettings_GetConnectionByUUID_Call struct { // GetConnectionByUUID is a helper method to define mock.On call // - uuid string -func (_e *MockSettings_Expecter) GetConnectionByUUID(uuid interface{}) *MockSettings_GetConnectionByUUID_Call { +func (_e *MockSettings_Expecter) GetConnectionByUUID(uuid any) *MockSettings_GetConnectionByUUID_Call { return &MockSettings_GetConnectionByUUID_Call{Call: _e.mock.On("GetConnectionByUUID", uuid)} } func (_c *MockSettings_GetConnectionByUUID_Call) Run(run func(uuid string)) *MockSettings_GetConnectionByUUID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockSettings_GetConnectionByUUID_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_GetConnectionByUUID_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_GetConnectionByUUID_Call) Return(connection gonetworkmanager.Connection, err error) *MockSettings_GetConnectionByUUID_Call { + _c.Call.Return(connection, err) return _c } -func (_c *MockSettings_GetConnectionByUUID_Call) RunAndReturn(run func(string) (gonetworkmanager.Connection, error)) *MockSettings_GetConnectionByUUID_Call { +func (_c *MockSettings_GetConnectionByUUID_Call) RunAndReturn(run func(uuid string) (gonetworkmanager.Connection, error)) *MockSettings_GetConnectionByUUID_Call { _c.Call.Return(run) return _c } -// GetPropertyCanModify provides a mock function with no fields -func (_m *MockSettings) GetPropertyCanModify() (bool, error) { - ret := _m.Called() +// GetPropertyCanModify provides a mock function for the type MockSettings +func (_mock *MockSettings) GetPropertyCanModify() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyCanModify") @@ -204,21 +232,19 @@ func (_m *MockSettings) GetPropertyCanModify() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -239,8 +265,8 @@ func (_c *MockSettings_GetPropertyCanModify_Call) Run(run func()) *MockSettings_ return _c } -func (_c *MockSettings_GetPropertyCanModify_Call) Return(_a0 bool, _a1 error) *MockSettings_GetPropertyCanModify_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_GetPropertyCanModify_Call) Return(b bool, err error) *MockSettings_GetPropertyCanModify_Call { + _c.Call.Return(b, err) return _c } @@ -249,9 +275,9 @@ func (_c *MockSettings_GetPropertyCanModify_Call) RunAndReturn(run func() (bool, return _c } -// GetPropertyHostname provides a mock function with no fields -func (_m *MockSettings) GetPropertyHostname() (string, error) { - ret := _m.Called() +// GetPropertyHostname provides a mock function for the type MockSettings +func (_mock *MockSettings) GetPropertyHostname() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPropertyHostname") @@ -259,21 +285,19 @@ func (_m *MockSettings) GetPropertyHostname() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -294,8 +318,8 @@ func (_c *MockSettings_GetPropertyHostname_Call) Run(run func()) *MockSettings_G return _c } -func (_c *MockSettings_GetPropertyHostname_Call) Return(_a0 string, _a1 error) *MockSettings_GetPropertyHostname_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_GetPropertyHostname_Call) Return(s string, err error) *MockSettings_GetPropertyHostname_Call { + _c.Call.Return(s, err) return _c } @@ -304,9 +328,9 @@ func (_c *MockSettings_GetPropertyHostname_Call) RunAndReturn(run func() (string return _c } -// ListConnections provides a mock function with no fields -func (_m *MockSettings) ListConnections() ([]gonetworkmanager.Connection, error) { - ret := _m.Called() +// ListConnections provides a mock function for the type MockSettings +func (_mock *MockSettings) ListConnections() ([]gonetworkmanager.Connection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ListConnections") @@ -314,23 +338,21 @@ func (_m *MockSettings) ListConnections() ([]gonetworkmanager.Connection, error) var r0 []gonetworkmanager.Connection var r1 error - if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]gonetworkmanager.Connection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -351,8 +373,8 @@ func (_c *MockSettings_ListConnections_Call) Run(run func()) *MockSettings_ListC return _c } -func (_c *MockSettings_ListConnections_Call) Return(_a0 []gonetworkmanager.Connection, _a1 error) *MockSettings_ListConnections_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockSettings_ListConnections_Call) Return(connections []gonetworkmanager.Connection, err error) *MockSettings_ListConnections_Call { + _c.Call.Return(connections, err) return _c } @@ -361,21 +383,20 @@ func (_c *MockSettings_ListConnections_Call) RunAndReturn(run func() ([]gonetwor return _c } -// ReloadConnections provides a mock function with no fields -func (_m *MockSettings) ReloadConnections() error { - ret := _m.Called() +// ReloadConnections provides a mock function for the type MockSettings +func (_mock *MockSettings) ReloadConnections() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ReloadConnections") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -396,8 +417,8 @@ func (_c *MockSettings_ReloadConnections_Call) Run(run func()) *MockSettings_Rel return _c } -func (_c *MockSettings_ReloadConnections_Call) Return(_a0 error) *MockSettings_ReloadConnections_Call { - _c.Call.Return(_a0) +func (_c *MockSettings_ReloadConnections_Call) Return(err error) *MockSettings_ReloadConnections_Call { + _c.Call.Return(err) return _c } @@ -406,21 +427,20 @@ func (_c *MockSettings_ReloadConnections_Call) RunAndReturn(run func() error) *M return _c } -// SaveHostname provides a mock function with given fields: hostname -func (_m *MockSettings) SaveHostname(hostname string) error { - ret := _m.Called(hostname) +// SaveHostname provides a mock function for the type MockSettings +func (_mock *MockSettings) SaveHostname(hostname string) error { + ret := _mock.Called(hostname) if len(ret) == 0 { panic("no return value specified for SaveHostname") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(hostname) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(hostname) } else { r0 = ret.Error(0) } - return r0 } @@ -431,37 +451,29 @@ type MockSettings_SaveHostname_Call struct { // SaveHostname is a helper method to define mock.On call // - hostname string -func (_e *MockSettings_Expecter) SaveHostname(hostname interface{}) *MockSettings_SaveHostname_Call { +func (_e *MockSettings_Expecter) SaveHostname(hostname any) *MockSettings_SaveHostname_Call { return &MockSettings_SaveHostname_Call{Call: _e.mock.On("SaveHostname", hostname)} } func (_c *MockSettings_SaveHostname_Call) Run(run func(hostname string)) *MockSettings_SaveHostname_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockSettings_SaveHostname_Call) Return(_a0 error) *MockSettings_SaveHostname_Call { - _c.Call.Return(_a0) +func (_c *MockSettings_SaveHostname_Call) Return(err error) *MockSettings_SaveHostname_Call { + _c.Call.Return(err) return _c } -func (_c *MockSettings_SaveHostname_Call) RunAndReturn(run func(string) error) *MockSettings_SaveHostname_Call { +func (_c *MockSettings_SaveHostname_Call) RunAndReturn(run func(hostname string) error) *MockSettings_SaveHostname_Call { _c.Call.Return(run) return _c } - -// NewMockSettings creates a new instance of MockSettings. 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 NewMockSettings(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSettings { - mock := &MockSettings{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go b/core/internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go index c0d1a3fa..131807e3 100644 --- a/core/internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go +++ b/core/internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go @@ -1,14 +1,30 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package dbus import ( - context "context" + "context" - dbus "github.com/godbus/dbus/v5" + "github.com/godbus/dbus/v5" mock "github.com/stretchr/testify/mock" ) +// NewMockBusObject creates a new instance of MockBusObject. 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 NewMockBusObject(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBusObject { + mock := &MockBusObject{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockBusObject is an autogenerated mock type for the BusObject type type MockBusObject struct { mock.Mock @@ -22,30 +38,30 @@ func (_m *MockBusObject) EXPECT() *MockBusObject_Expecter { return &MockBusObject_Expecter{mock: &_m.Mock} } -// AddMatchSignal provides a mock function with given fields: iface, member, options -func (_m *MockBusObject) AddMatchSignal(iface string, member string, options ...dbus.MatchOption) *dbus.Call { - _va := make([]interface{}, len(options)) +// AddMatchSignal provides a mock function for the type MockBusObject +func (_mock *MockBusObject) AddMatchSignal(iface string, member string, options ...dbus.MatchOption) *dbus.Call { + // dbus.MatchOption + _va := make([]any, len(options)) for _i := range options { _va[_i] = options[_i] } - var _ca []interface{} + var _ca []any _ca = append(_ca, iface, member) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for AddMatchSignal") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(string, string, ...dbus.MatchOption) *dbus.Call); ok { - r0 = rf(iface, member, options...) + if returnFunc, ok := ret.Get(0).(func(string, string, ...dbus.MatchOption) *dbus.Call); ok { + r0 = returnFunc(iface, member, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -58,54 +74,67 @@ type MockBusObject_AddMatchSignal_Call struct { // - iface string // - member string // - options ...dbus.MatchOption -func (_e *MockBusObject_Expecter) AddMatchSignal(iface interface{}, member interface{}, options ...interface{}) *MockBusObject_AddMatchSignal_Call { +func (_e *MockBusObject_Expecter) AddMatchSignal(iface any, member any, options ...any) *MockBusObject_AddMatchSignal_Call { return &MockBusObject_AddMatchSignal_Call{Call: _e.mock.On("AddMatchSignal", - append([]interface{}{iface, member}, options...)...)} + append([]any{iface, member}, options...)...)} } func (_c *MockBusObject_AddMatchSignal_Call) Run(run func(iface string, member string, options ...dbus.MatchOption)) *MockBusObject_AddMatchSignal_Call { _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []dbus.MatchOption variadicArgs := make([]dbus.MatchOption, len(args)-2) for i, a := range args[2:] { if a != nil { variadicArgs[i] = a.(dbus.MatchOption) } } - run(args[0].(string), args[1].(string), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } -func (_c *MockBusObject_AddMatchSignal_Call) Return(_a0 *dbus.Call) *MockBusObject_AddMatchSignal_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_AddMatchSignal_Call) Return(call *dbus.Call) *MockBusObject_AddMatchSignal_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_AddMatchSignal_Call) RunAndReturn(run func(string, string, ...dbus.MatchOption) *dbus.Call) *MockBusObject_AddMatchSignal_Call { +func (_c *MockBusObject_AddMatchSignal_Call) RunAndReturn(run func(iface string, member string, options ...dbus.MatchOption) *dbus.Call) *MockBusObject_AddMatchSignal_Call { _c.Call.Return(run) return _c } -// Call provides a mock function with given fields: method, flags, args -func (_m *MockBusObject) Call(method string, flags dbus.Flags, args ...interface{}) *dbus.Call { - var _ca []interface{} +// Call provides a mock function for the type MockBusObject +func (_mock *MockBusObject) Call(method string, flags dbus.Flags, args ...any) *dbus.Call { + var _ca []any _ca = append(_ca, method, flags) _ca = append(_ca, args...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Call") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(string, dbus.Flags, ...interface{}) *dbus.Call); ok { - r0 = rf(method, flags, args...) + if returnFunc, ok := ret.Get(0).(func(string, dbus.Flags, ...any) *dbus.Call); ok { + r0 = returnFunc(method, flags, args...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -117,55 +146,68 @@ type MockBusObject_Call_Call struct { // Call is a helper method to define mock.On call // - method string // - flags dbus.Flags -// - args ...interface{} -func (_e *MockBusObject_Expecter) Call(method interface{}, flags interface{}, args ...interface{}) *MockBusObject_Call_Call { +// - args ...any +func (_e *MockBusObject_Expecter) Call(method any, flags any, args ...any) *MockBusObject_Call_Call { return &MockBusObject_Call_Call{Call: _e.mock.On("Call", - append([]interface{}{method, flags}, args...)...)} + append([]any{method, flags}, args...)...)} } -func (_c *MockBusObject_Call_Call) Run(run func(method string, flags dbus.Flags, args ...interface{})) *MockBusObject_Call_Call { +func (_c *MockBusObject_Call_Call) Run(run func(method string, flags dbus.Flags, args ...any)) *MockBusObject_Call_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]interface{}, len(args)-2) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 dbus.Flags + if args[1] != nil { + arg1 = args[1].(dbus.Flags) + } + var arg2 []any + variadicArgs := make([]any, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(interface{}) + variadicArgs[i] = a.(any) } } - run(args[0].(string), args[1].(dbus.Flags), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } -func (_c *MockBusObject_Call_Call) Return(_a0 *dbus.Call) *MockBusObject_Call_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_Call_Call) Return(call *dbus.Call) *MockBusObject_Call_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_Call_Call) RunAndReturn(run func(string, dbus.Flags, ...interface{}) *dbus.Call) *MockBusObject_Call_Call { +func (_c *MockBusObject_Call_Call) RunAndReturn(run func(method string, flags dbus.Flags, args ...any) *dbus.Call) *MockBusObject_Call_Call { _c.Call.Return(run) return _c } -// CallWithContext provides a mock function with given fields: ctx, method, flags, args -func (_m *MockBusObject) CallWithContext(ctx context.Context, method string, flags dbus.Flags, args ...interface{}) *dbus.Call { - var _ca []interface{} +// CallWithContext provides a mock function for the type MockBusObject +func (_mock *MockBusObject) CallWithContext(ctx context.Context, method string, flags dbus.Flags, args ...any) *dbus.Call { + var _ca []any _ca = append(_ca, ctx, method, flags) _ca = append(_ca, args...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for CallWithContext") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(context.Context, string, dbus.Flags, ...interface{}) *dbus.Call); ok { - r0 = rf(ctx, method, flags, args...) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, dbus.Flags, ...any) *dbus.Call); ok { + r0 = returnFunc(ctx, method, flags, args...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -178,50 +220,68 @@ type MockBusObject_CallWithContext_Call struct { // - ctx context.Context // - method string // - flags dbus.Flags -// - args ...interface{} -func (_e *MockBusObject_Expecter) CallWithContext(ctx interface{}, method interface{}, flags interface{}, args ...interface{}) *MockBusObject_CallWithContext_Call { +// - args ...any +func (_e *MockBusObject_Expecter) CallWithContext(ctx any, method any, flags any, args ...any) *MockBusObject_CallWithContext_Call { return &MockBusObject_CallWithContext_Call{Call: _e.mock.On("CallWithContext", - append([]interface{}{ctx, method, flags}, args...)...)} + append([]any{ctx, method, flags}, args...)...)} } -func (_c *MockBusObject_CallWithContext_Call) Run(run func(ctx context.Context, method string, flags dbus.Flags, args ...interface{})) *MockBusObject_CallWithContext_Call { +func (_c *MockBusObject_CallWithContext_Call) Run(run func(ctx context.Context, method string, flags dbus.Flags, args ...any)) *MockBusObject_CallWithContext_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]interface{}, len(args)-3) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 dbus.Flags + if args[2] != nil { + arg2 = args[2].(dbus.Flags) + } + var arg3 []any + variadicArgs := make([]any, len(args)-3) for i, a := range args[3:] { if a != nil { - variadicArgs[i] = a.(interface{}) + variadicArgs[i] = a.(any) } } - run(args[0].(context.Context), args[1].(string), args[2].(dbus.Flags), variadicArgs...) + arg3 = variadicArgs + run( + arg0, + arg1, + arg2, + arg3..., + ) }) return _c } -func (_c *MockBusObject_CallWithContext_Call) Return(_a0 *dbus.Call) *MockBusObject_CallWithContext_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_CallWithContext_Call) Return(call *dbus.Call) *MockBusObject_CallWithContext_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_CallWithContext_Call) RunAndReturn(run func(context.Context, string, dbus.Flags, ...interface{}) *dbus.Call) *MockBusObject_CallWithContext_Call { +func (_c *MockBusObject_CallWithContext_Call) RunAndReturn(run func(ctx context.Context, method string, flags dbus.Flags, args ...any) *dbus.Call) *MockBusObject_CallWithContext_Call { _c.Call.Return(run) return _c } -// Destination provides a mock function with no fields -func (_m *MockBusObject) Destination() string { - ret := _m.Called() +// Destination provides a mock function for the type MockBusObject +func (_mock *MockBusObject) Destination() string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Destination") } var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - return r0 } @@ -242,8 +302,8 @@ func (_c *MockBusObject_Destination_Call) Run(run func()) *MockBusObject_Destina return _c } -func (_c *MockBusObject_Destination_Call) Return(_a0 string) *MockBusObject_Destination_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_Destination_Call) Return(s string) *MockBusObject_Destination_Call { + _c.Call.Return(s) return _c } @@ -252,9 +312,9 @@ func (_c *MockBusObject_Destination_Call) RunAndReturn(run func() string) *MockB return _c } -// GetProperty provides a mock function with given fields: p -func (_m *MockBusObject) GetProperty(p string) (dbus.Variant, error) { - ret := _m.Called(p) +// GetProperty provides a mock function for the type MockBusObject +func (_mock *MockBusObject) GetProperty(p string) (dbus.Variant, error) { + ret := _mock.Called(p) if len(ret) == 0 { panic("no return value specified for GetProperty") @@ -262,21 +322,19 @@ func (_m *MockBusObject) GetProperty(p string) (dbus.Variant, error) { var r0 dbus.Variant var r1 error - if rf, ok := ret.Get(0).(func(string) (dbus.Variant, error)); ok { - return rf(p) + if returnFunc, ok := ret.Get(0).(func(string) (dbus.Variant, error)); ok { + return returnFunc(p) } - if rf, ok := ret.Get(0).(func(string) dbus.Variant); ok { - r0 = rf(p) + if returnFunc, ok := ret.Get(0).(func(string) dbus.Variant); ok { + r0 = returnFunc(p) } else { r0 = ret.Get(0).(dbus.Variant) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(p) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(p) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -287,47 +345,52 @@ type MockBusObject_GetProperty_Call struct { // GetProperty is a helper method to define mock.On call // - p string -func (_e *MockBusObject_Expecter) GetProperty(p interface{}) *MockBusObject_GetProperty_Call { +func (_e *MockBusObject_Expecter) GetProperty(p any) *MockBusObject_GetProperty_Call { return &MockBusObject_GetProperty_Call{Call: _e.mock.On("GetProperty", p)} } func (_c *MockBusObject_GetProperty_Call) Run(run func(p string)) *MockBusObject_GetProperty_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBusObject_GetProperty_Call) Return(_a0 dbus.Variant, _a1 error) *MockBusObject_GetProperty_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBusObject_GetProperty_Call) Return(variant dbus.Variant, err error) *MockBusObject_GetProperty_Call { + _c.Call.Return(variant, err) return _c } -func (_c *MockBusObject_GetProperty_Call) RunAndReturn(run func(string) (dbus.Variant, error)) *MockBusObject_GetProperty_Call { +func (_c *MockBusObject_GetProperty_Call) RunAndReturn(run func(p string) (dbus.Variant, error)) *MockBusObject_GetProperty_Call { _c.Call.Return(run) return _c } -// Go provides a mock function with given fields: method, flags, ch, args -func (_m *MockBusObject) Go(method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{}) *dbus.Call { - var _ca []interface{} +// Go provides a mock function for the type MockBusObject +func (_mock *MockBusObject) Go(method string, flags dbus.Flags, ch chan *dbus.Call, args ...any) *dbus.Call { + var _ca []any _ca = append(_ca, method, flags, ch) _ca = append(_ca, args...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Go") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(string, dbus.Flags, chan *dbus.Call, ...interface{}) *dbus.Call); ok { - r0 = rf(method, flags, ch, args...) + if returnFunc, ok := ret.Get(0).(func(string, dbus.Flags, chan *dbus.Call, ...any) *dbus.Call); ok { + r0 = returnFunc(method, flags, ch, args...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -340,55 +403,73 @@ type MockBusObject_Go_Call struct { // - method string // - flags dbus.Flags // - ch chan *dbus.Call -// - args ...interface{} -func (_e *MockBusObject_Expecter) Go(method interface{}, flags interface{}, ch interface{}, args ...interface{}) *MockBusObject_Go_Call { +// - args ...any +func (_e *MockBusObject_Expecter) Go(method any, flags any, ch any, args ...any) *MockBusObject_Go_Call { return &MockBusObject_Go_Call{Call: _e.mock.On("Go", - append([]interface{}{method, flags, ch}, args...)...)} + append([]any{method, flags, ch}, args...)...)} } -func (_c *MockBusObject_Go_Call) Run(run func(method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{})) *MockBusObject_Go_Call { +func (_c *MockBusObject_Go_Call) Run(run func(method string, flags dbus.Flags, ch chan *dbus.Call, args ...any)) *MockBusObject_Go_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]interface{}, len(args)-3) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 dbus.Flags + if args[1] != nil { + arg1 = args[1].(dbus.Flags) + } + var arg2 chan *dbus.Call + if args[2] != nil { + arg2 = args[2].(chan *dbus.Call) + } + var arg3 []any + variadicArgs := make([]any, len(args)-3) for i, a := range args[3:] { if a != nil { - variadicArgs[i] = a.(interface{}) + variadicArgs[i] = a.(any) } } - run(args[0].(string), args[1].(dbus.Flags), args[2].(chan *dbus.Call), variadicArgs...) + arg3 = variadicArgs + run( + arg0, + arg1, + arg2, + arg3..., + ) }) return _c } -func (_c *MockBusObject_Go_Call) Return(_a0 *dbus.Call) *MockBusObject_Go_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_Go_Call) Return(call *dbus.Call) *MockBusObject_Go_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_Go_Call) RunAndReturn(run func(string, dbus.Flags, chan *dbus.Call, ...interface{}) *dbus.Call) *MockBusObject_Go_Call { +func (_c *MockBusObject_Go_Call) RunAndReturn(run func(method string, flags dbus.Flags, ch chan *dbus.Call, args ...any) *dbus.Call) *MockBusObject_Go_Call { _c.Call.Return(run) return _c } -// GoWithContext provides a mock function with given fields: ctx, method, flags, ch, args -func (_m *MockBusObject) GoWithContext(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{}) *dbus.Call { - var _ca []interface{} +// GoWithContext provides a mock function for the type MockBusObject +func (_mock *MockBusObject) GoWithContext(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...any) *dbus.Call { + var _ca []any _ca = append(_ca, ctx, method, flags, ch) _ca = append(_ca, args...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GoWithContext") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(context.Context, string, dbus.Flags, chan *dbus.Call, ...interface{}) *dbus.Call); ok { - r0 = rf(ctx, method, flags, ch, args...) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, dbus.Flags, chan *dbus.Call, ...any) *dbus.Call); ok { + r0 = returnFunc(ctx, method, flags, ch, args...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -402,50 +483,73 @@ type MockBusObject_GoWithContext_Call struct { // - method string // - flags dbus.Flags // - ch chan *dbus.Call -// - args ...interface{} -func (_e *MockBusObject_Expecter) GoWithContext(ctx interface{}, method interface{}, flags interface{}, ch interface{}, args ...interface{}) *MockBusObject_GoWithContext_Call { +// - args ...any +func (_e *MockBusObject_Expecter) GoWithContext(ctx any, method any, flags any, ch any, args ...any) *MockBusObject_GoWithContext_Call { return &MockBusObject_GoWithContext_Call{Call: _e.mock.On("GoWithContext", - append([]interface{}{ctx, method, flags, ch}, args...)...)} + append([]any{ctx, method, flags, ch}, args...)...)} } -func (_c *MockBusObject_GoWithContext_Call) Run(run func(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{})) *MockBusObject_GoWithContext_Call { +func (_c *MockBusObject_GoWithContext_Call) Run(run func(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...any)) *MockBusObject_GoWithContext_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]interface{}, len(args)-4) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 dbus.Flags + if args[2] != nil { + arg2 = args[2].(dbus.Flags) + } + var arg3 chan *dbus.Call + if args[3] != nil { + arg3 = args[3].(chan *dbus.Call) + } + var arg4 []any + variadicArgs := make([]any, len(args)-4) for i, a := range args[4:] { if a != nil { - variadicArgs[i] = a.(interface{}) + variadicArgs[i] = a.(any) } } - run(args[0].(context.Context), args[1].(string), args[2].(dbus.Flags), args[3].(chan *dbus.Call), variadicArgs...) + arg4 = variadicArgs + run( + arg0, + arg1, + arg2, + arg3, + arg4..., + ) }) return _c } -func (_c *MockBusObject_GoWithContext_Call) Return(_a0 *dbus.Call) *MockBusObject_GoWithContext_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_GoWithContext_Call) Return(call *dbus.Call) *MockBusObject_GoWithContext_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_GoWithContext_Call) RunAndReturn(run func(context.Context, string, dbus.Flags, chan *dbus.Call, ...interface{}) *dbus.Call) *MockBusObject_GoWithContext_Call { +func (_c *MockBusObject_GoWithContext_Call) RunAndReturn(run func(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...any) *dbus.Call) *MockBusObject_GoWithContext_Call { _c.Call.Return(run) return _c } -// Path provides a mock function with no fields -func (_m *MockBusObject) Path() dbus.ObjectPath { - ret := _m.Called() +// Path provides a mock function for the type MockBusObject +func (_mock *MockBusObject) Path() dbus.ObjectPath { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Path") } var r0 dbus.ObjectPath - if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() dbus.ObjectPath); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(dbus.ObjectPath) } - return r0 } @@ -466,8 +570,8 @@ func (_c *MockBusObject_Path_Call) Run(run func()) *MockBusObject_Path_Call { return _c } -func (_c *MockBusObject_Path_Call) Return(_a0 dbus.ObjectPath) *MockBusObject_Path_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_Path_Call) Return(objectPath dbus.ObjectPath) *MockBusObject_Path_Call { + _c.Call.Return(objectPath) return _c } @@ -476,30 +580,30 @@ func (_c *MockBusObject_Path_Call) RunAndReturn(run func() dbus.ObjectPath) *Moc return _c } -// RemoveMatchSignal provides a mock function with given fields: iface, member, options -func (_m *MockBusObject) RemoveMatchSignal(iface string, member string, options ...dbus.MatchOption) *dbus.Call { - _va := make([]interface{}, len(options)) +// RemoveMatchSignal provides a mock function for the type MockBusObject +func (_mock *MockBusObject) RemoveMatchSignal(iface string, member string, options ...dbus.MatchOption) *dbus.Call { + // dbus.MatchOption + _va := make([]any, len(options)) for _i := range options { _va[_i] = options[_i] } - var _ca []interface{} + var _ca []any _ca = append(_ca, iface, member) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for RemoveMatchSignal") } var r0 *dbus.Call - if rf, ok := ret.Get(0).(func(string, string, ...dbus.MatchOption) *dbus.Call); ok { - r0 = rf(iface, member, options...) + if returnFunc, ok := ret.Get(0).(func(string, string, ...dbus.MatchOption) *dbus.Call); ok { + r0 = returnFunc(iface, member, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dbus.Call) } } - return r0 } @@ -512,49 +616,62 @@ type MockBusObject_RemoveMatchSignal_Call struct { // - iface string // - member string // - options ...dbus.MatchOption -func (_e *MockBusObject_Expecter) RemoveMatchSignal(iface interface{}, member interface{}, options ...interface{}) *MockBusObject_RemoveMatchSignal_Call { +func (_e *MockBusObject_Expecter) RemoveMatchSignal(iface any, member any, options ...any) *MockBusObject_RemoveMatchSignal_Call { return &MockBusObject_RemoveMatchSignal_Call{Call: _e.mock.On("RemoveMatchSignal", - append([]interface{}{iface, member}, options...)...)} + append([]any{iface, member}, options...)...)} } func (_c *MockBusObject_RemoveMatchSignal_Call) Run(run func(iface string, member string, options ...dbus.MatchOption)) *MockBusObject_RemoveMatchSignal_Call { _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []dbus.MatchOption variadicArgs := make([]dbus.MatchOption, len(args)-2) for i, a := range args[2:] { if a != nil { variadicArgs[i] = a.(dbus.MatchOption) } } - run(args[0].(string), args[1].(string), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } -func (_c *MockBusObject_RemoveMatchSignal_Call) Return(_a0 *dbus.Call) *MockBusObject_RemoveMatchSignal_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_RemoveMatchSignal_Call) Return(call *dbus.Call) *MockBusObject_RemoveMatchSignal_Call { + _c.Call.Return(call) return _c } -func (_c *MockBusObject_RemoveMatchSignal_Call) RunAndReturn(run func(string, string, ...dbus.MatchOption) *dbus.Call) *MockBusObject_RemoveMatchSignal_Call { +func (_c *MockBusObject_RemoveMatchSignal_Call) RunAndReturn(run func(iface string, member string, options ...dbus.MatchOption) *dbus.Call) *MockBusObject_RemoveMatchSignal_Call { _c.Call.Return(run) return _c } -// SetProperty provides a mock function with given fields: p, v -func (_m *MockBusObject) SetProperty(p string, v interface{}) error { - ret := _m.Called(p, v) +// SetProperty provides a mock function for the type MockBusObject +func (_mock *MockBusObject) SetProperty(p string, v any) error { + ret := _mock.Called(p, v) if len(ret) == 0 { panic("no return value specified for SetProperty") } var r0 error - if rf, ok := ret.Get(0).(func(string, interface{}) error); ok { - r0 = rf(p, v) + if returnFunc, ok := ret.Get(0).(func(string, any) error); ok { + r0 = returnFunc(p, v) } else { r0 = ret.Error(0) } - return r0 } @@ -565,43 +682,53 @@ type MockBusObject_SetProperty_Call struct { // SetProperty is a helper method to define mock.On call // - p string -// - v interface{} -func (_e *MockBusObject_Expecter) SetProperty(p interface{}, v interface{}) *MockBusObject_SetProperty_Call { +// - v any +func (_e *MockBusObject_Expecter) SetProperty(p any, v any) *MockBusObject_SetProperty_Call { return &MockBusObject_SetProperty_Call{Call: _e.mock.On("SetProperty", p, v)} } -func (_c *MockBusObject_SetProperty_Call) Run(run func(p string, v interface{})) *MockBusObject_SetProperty_Call { +func (_c *MockBusObject_SetProperty_Call) Run(run func(p string, v any)) *MockBusObject_SetProperty_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(interface{})) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 any + if args[1] != nil { + arg1 = args[1].(any) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBusObject_SetProperty_Call) Return(_a0 error) *MockBusObject_SetProperty_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_SetProperty_Call) Return(err error) *MockBusObject_SetProperty_Call { + _c.Call.Return(err) return _c } -func (_c *MockBusObject_SetProperty_Call) RunAndReturn(run func(string, interface{}) error) *MockBusObject_SetProperty_Call { +func (_c *MockBusObject_SetProperty_Call) RunAndReturn(run func(p string, v any) error) *MockBusObject_SetProperty_Call { _c.Call.Return(run) return _c } -// StoreProperty provides a mock function with given fields: p, value -func (_m *MockBusObject) StoreProperty(p string, value interface{}) error { - ret := _m.Called(p, value) +// StoreProperty provides a mock function for the type MockBusObject +func (_mock *MockBusObject) StoreProperty(p string, value any) error { + ret := _mock.Called(p, value) if len(ret) == 0 { panic("no return value specified for StoreProperty") } var r0 error - if rf, ok := ret.Get(0).(func(string, interface{}) error); ok { - r0 = rf(p, value) + if returnFunc, ok := ret.Get(0).(func(string, any) error); ok { + r0 = returnFunc(p, value) } else { r0 = ret.Error(0) } - return r0 } @@ -612,38 +739,35 @@ type MockBusObject_StoreProperty_Call struct { // StoreProperty is a helper method to define mock.On call // - p string -// - value interface{} -func (_e *MockBusObject_Expecter) StoreProperty(p interface{}, value interface{}) *MockBusObject_StoreProperty_Call { +// - value any +func (_e *MockBusObject_Expecter) StoreProperty(p any, value any) *MockBusObject_StoreProperty_Call { return &MockBusObject_StoreProperty_Call{Call: _e.mock.On("StoreProperty", p, value)} } -func (_c *MockBusObject_StoreProperty_Call) Run(run func(p string, value interface{})) *MockBusObject_StoreProperty_Call { +func (_c *MockBusObject_StoreProperty_Call) Run(run func(p string, value any)) *MockBusObject_StoreProperty_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(interface{})) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 any + if args[1] != nil { + arg1 = args[1].(any) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBusObject_StoreProperty_Call) Return(_a0 error) *MockBusObject_StoreProperty_Call { - _c.Call.Return(_a0) +func (_c *MockBusObject_StoreProperty_Call) Return(err error) *MockBusObject_StoreProperty_Call { + _c.Call.Return(err) return _c } -func (_c *MockBusObject_StoreProperty_Call) RunAndReturn(run func(string, interface{}) error) *MockBusObject_StoreProperty_Call { +func (_c *MockBusObject_StoreProperty_Call) RunAndReturn(run func(p string, value any) error) *MockBusObject_StoreProperty_Call { _c.Call.Return(run) return _c } - -// NewMockBusObject creates a new instance of MockBusObject. 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 NewMockBusObject(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBusObject { - mock := &MockBusObject{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/internal/plugins/mock_GitClient.go b/core/internal/mocks/internal/plugins/mock_GitClient.go index 23e34f3e..007ebc25 100644 --- a/core/internal/mocks/internal/plugins/mock_GitClient.go +++ b/core/internal/mocks/internal/plugins/mock_GitClient.go @@ -1,8 +1,26 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package plugins -import mock "github.com/stretchr/testify/mock" +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewMockGitClient creates a new instance of MockGitClient. 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 NewMockGitClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockGitClient { + mock := &MockGitClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // MockGitClient is an autogenerated mock type for the GitClient type type MockGitClient struct { @@ -17,9 +35,9 @@ func (_m *MockGitClient) EXPECT() *MockGitClient_Expecter { return &MockGitClient_Expecter{mock: &_m.Mock} } -// HasUpdates provides a mock function with given fields: path -func (_m *MockGitClient) HasUpdates(path string) (bool, error) { - ret := _m.Called(path) +// HasUpdates provides a mock function for the type MockGitClient +func (_mock *MockGitClient) HasUpdates(path string) (bool, error) { + ret := _mock.Called(path) if len(ret) == 0 { panic("no return value specified for HasUpdates") @@ -27,21 +45,19 @@ func (_m *MockGitClient) HasUpdates(path string) (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(path) + if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok { + return returnFunc(path) } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(path) + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(path) } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(path) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(path) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -58,36 +74,41 @@ func (_e *MockGitClient_Expecter) HasUpdates(path any) *MockGitClient_HasUpdates func (_c *MockGitClient_HasUpdates_Call) Run(run func(path string)) *MockGitClient_HasUpdates_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockGitClient_HasUpdates_Call) Return(_a0 bool, _a1 error) *MockGitClient_HasUpdates_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockGitClient_HasUpdates_Call) Return(b bool, err error) *MockGitClient_HasUpdates_Call { + _c.Call.Return(b, err) return _c } -func (_c *MockGitClient_HasUpdates_Call) RunAndReturn(run func(string) (bool, error)) *MockGitClient_HasUpdates_Call { +func (_c *MockGitClient_HasUpdates_Call) RunAndReturn(run func(path string) (bool, error)) *MockGitClient_HasUpdates_Call { _c.Call.Return(run) return _c } -// PlainClone provides a mock function with given fields: path, url -func (_m *MockGitClient) PlainClone(path string, url string) error { - ret := _m.Called(path, url) +// PlainClone provides a mock function for the type MockGitClient +func (_mock *MockGitClient) PlainClone(path string, url string) error { + ret := _mock.Called(path, url) if len(ret) == 0 { panic("no return value specified for PlainClone") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(path, url) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(path, url) } else { r0 = ret.Error(0) } - return r0 } @@ -105,36 +126,46 @@ func (_e *MockGitClient_Expecter) PlainClone(path any, url any) *MockGitClient_P func (_c *MockGitClient_PlainClone_Call) Run(run func(path string, url string)) *MockGitClient_PlainClone_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockGitClient_PlainClone_Call) Return(_a0 error) *MockGitClient_PlainClone_Call { - _c.Call.Return(_a0) +func (_c *MockGitClient_PlainClone_Call) Return(err error) *MockGitClient_PlainClone_Call { + _c.Call.Return(err) return _c } -func (_c *MockGitClient_PlainClone_Call) RunAndReturn(run func(string, string) error) *MockGitClient_PlainClone_Call { +func (_c *MockGitClient_PlainClone_Call) RunAndReturn(run func(path string, url string) error) *MockGitClient_PlainClone_Call { _c.Call.Return(run) return _c } -// Pull provides a mock function with given fields: path -func (_m *MockGitClient) Pull(path string) error { - ret := _m.Called(path) +// Pull provides a mock function for the type MockGitClient +func (_mock *MockGitClient) Pull(path string) error { + ret := _mock.Called(path) if len(ret) == 0 { panic("no return value specified for Pull") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(path) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(path) } else { r0 = ret.Error(0) } - return r0 } @@ -151,31 +182,23 @@ func (_e *MockGitClient_Expecter) Pull(path any) *MockGitClient_Pull_Call { func (_c *MockGitClient_Pull_Call) Run(run func(path string)) *MockGitClient_Pull_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockGitClient_Pull_Call) Return(_a0 error) *MockGitClient_Pull_Call { - _c.Call.Return(_a0) +func (_c *MockGitClient_Pull_Call) Return(err error) *MockGitClient_Pull_Call { + _c.Call.Return(err) return _c } -func (_c *MockGitClient_Pull_Call) RunAndReturn(run func(string) error) *MockGitClient_Pull_Call { +func (_c *MockGitClient_Pull_Call) RunAndReturn(run func(path string) error) *MockGitClient_Pull_Call { _c.Call.Return(run) return _c } - -// NewMockGitClient creates a new instance of MockGitClient. 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 NewMockGitClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGitClient { - mock := &MockGitClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/net/mock_Conn.go b/core/internal/mocks/net/mock_Conn.go index 248a0d8a..079da6db 100644 --- a/core/internal/mocks/net/mock_Conn.go +++ b/core/internal/mocks/net/mock_Conn.go @@ -1,15 +1,30 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package net import ( - net "net" + "net" + "time" mock "github.com/stretchr/testify/mock" - - time "time" ) +// NewMockConn creates a new instance of MockConn. 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 NewMockConn(t interface { + mock.TestingT + Cleanup(func()) +}) *MockConn { + mock := &MockConn{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockConn is an autogenerated mock type for the Conn type type MockConn struct { mock.Mock @@ -23,21 +38,20 @@ func (_m *MockConn) EXPECT() *MockConn_Expecter { return &MockConn_Expecter{mock: &_m.Mock} } -// Close provides a mock function with no fields -func (_m *MockConn) Close() error { - ret := _m.Called() +// Close provides a mock function for the type MockConn +func (_mock *MockConn) Close() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -58,8 +72,8 @@ func (_c *MockConn_Close_Call) Run(run func()) *MockConn_Close_Call { return _c } -func (_c *MockConn_Close_Call) Return(_a0 error) *MockConn_Close_Call { - _c.Call.Return(_a0) +func (_c *MockConn_Close_Call) Return(err error) *MockConn_Close_Call { + _c.Call.Return(err) return _c } @@ -68,23 +82,22 @@ func (_c *MockConn_Close_Call) RunAndReturn(run func() error) *MockConn_Close_Ca return _c } -// LocalAddr provides a mock function with no fields -func (_m *MockConn) LocalAddr() net.Addr { - ret := _m.Called() +// LocalAddr provides a mock function for the type MockConn +func (_mock *MockConn) LocalAddr() net.Addr { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LocalAddr") } var r0 net.Addr - if rf, ok := ret.Get(0).(func() net.Addr); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() net.Addr); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(net.Addr) } } - return r0 } @@ -105,8 +118,8 @@ func (_c *MockConn_LocalAddr_Call) Run(run func()) *MockConn_LocalAddr_Call { return _c } -func (_c *MockConn_LocalAddr_Call) Return(_a0 net.Addr) *MockConn_LocalAddr_Call { - _c.Call.Return(_a0) +func (_c *MockConn_LocalAddr_Call) Return(addr net.Addr) *MockConn_LocalAddr_Call { + _c.Call.Return(addr) return _c } @@ -115,9 +128,9 @@ func (_c *MockConn_LocalAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_L return _c } -// Read provides a mock function with given fields: b -func (_m *MockConn) Read(b []byte) (int, error) { - ret := _m.Called(b) +// Read provides a mock function for the type MockConn +func (_mock *MockConn) Read(b []byte) (int, error) { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for Read") @@ -125,21 +138,19 @@ func (_m *MockConn) Read(b []byte) (int, error) { var r0 int var r1 error - if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { - return rf(b) + if returnFunc, ok := ret.Get(0).(func([]byte) (int, error)); ok { + return returnFunc(b) } - if rf, ok := ret.Get(0).(func([]byte) int); ok { - r0 = rf(b) + if returnFunc, ok := ret.Get(0).(func([]byte) int); ok { + r0 = returnFunc(b) } else { r0 = ret.Get(0).(int) } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(b) + if returnFunc, ok := ret.Get(1).(func([]byte) error); ok { + r1 = returnFunc(b) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -150,13 +161,19 @@ type MockConn_Read_Call struct { // Read is a helper method to define mock.On call // - b []byte -func (_e *MockConn_Expecter) Read(b interface{}) *MockConn_Read_Call { +func (_e *MockConn_Expecter) Read(b any) *MockConn_Read_Call { return &MockConn_Read_Call{Call: _e.mock.On("Read", b)} } func (_c *MockConn_Read_Call) Run(run func(b []byte)) *MockConn_Read_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) + var arg0 []byte + if args[0] != nil { + arg0 = args[0].([]byte) + } + run( + arg0, + ) }) return _c } @@ -166,28 +183,27 @@ func (_c *MockConn_Read_Call) Return(n int, err error) *MockConn_Read_Call { return _c } -func (_c *MockConn_Read_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Read_Call { +func (_c *MockConn_Read_Call) RunAndReturn(run func(b []byte) (int, error)) *MockConn_Read_Call { _c.Call.Return(run) return _c } -// RemoteAddr provides a mock function with no fields -func (_m *MockConn) RemoteAddr() net.Addr { - ret := _m.Called() +// RemoteAddr provides a mock function for the type MockConn +func (_mock *MockConn) RemoteAddr() net.Addr { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RemoteAddr") } var r0 net.Addr - if rf, ok := ret.Get(0).(func() net.Addr); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() net.Addr); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(net.Addr) } } - return r0 } @@ -208,8 +224,8 @@ func (_c *MockConn_RemoteAddr_Call) Run(run func()) *MockConn_RemoteAddr_Call { return _c } -func (_c *MockConn_RemoteAddr_Call) Return(_a0 net.Addr) *MockConn_RemoteAddr_Call { - _c.Call.Return(_a0) +func (_c *MockConn_RemoteAddr_Call) Return(addr net.Addr) *MockConn_RemoteAddr_Call { + _c.Call.Return(addr) return _c } @@ -218,21 +234,20 @@ func (_c *MockConn_RemoteAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_ return _c } -// SetDeadline provides a mock function with given fields: t -func (_m *MockConn) SetDeadline(t time.Time) error { - ret := _m.Called(t) +// SetDeadline provides a mock function for the type MockConn +func (_mock *MockConn) SetDeadline(t time.Time) error { + ret := _mock.Called(t) if len(ret) == 0 { panic("no return value specified for SetDeadline") } var r0 error - if rf, ok := ret.Get(0).(func(time.Time) error); ok { - r0 = rf(t) + if returnFunc, ok := ret.Get(0).(func(time.Time) error); ok { + r0 = returnFunc(t) } else { r0 = ret.Error(0) } - return r0 } @@ -243,42 +258,47 @@ type MockConn_SetDeadline_Call struct { // SetDeadline is a helper method to define mock.On call // - t time.Time -func (_e *MockConn_Expecter) SetDeadline(t interface{}) *MockConn_SetDeadline_Call { +func (_e *MockConn_Expecter) SetDeadline(t any) *MockConn_SetDeadline_Call { return &MockConn_SetDeadline_Call{Call: _e.mock.On("SetDeadline", t)} } func (_c *MockConn_SetDeadline_Call) Run(run func(t time.Time)) *MockConn_SetDeadline_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Time)) + var arg0 time.Time + if args[0] != nil { + arg0 = args[0].(time.Time) + } + run( + arg0, + ) }) return _c } -func (_c *MockConn_SetDeadline_Call) Return(_a0 error) *MockConn_SetDeadline_Call { - _c.Call.Return(_a0) +func (_c *MockConn_SetDeadline_Call) Return(err error) *MockConn_SetDeadline_Call { + _c.Call.Return(err) return _c } -func (_c *MockConn_SetDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetDeadline_Call { +func (_c *MockConn_SetDeadline_Call) RunAndReturn(run func(t time.Time) error) *MockConn_SetDeadline_Call { _c.Call.Return(run) return _c } -// SetReadDeadline provides a mock function with given fields: t -func (_m *MockConn) SetReadDeadline(t time.Time) error { - ret := _m.Called(t) +// SetReadDeadline provides a mock function for the type MockConn +func (_mock *MockConn) SetReadDeadline(t time.Time) error { + ret := _mock.Called(t) if len(ret) == 0 { panic("no return value specified for SetReadDeadline") } var r0 error - if rf, ok := ret.Get(0).(func(time.Time) error); ok { - r0 = rf(t) + if returnFunc, ok := ret.Get(0).(func(time.Time) error); ok { + r0 = returnFunc(t) } else { r0 = ret.Error(0) } - return r0 } @@ -289,42 +309,47 @@ type MockConn_SetReadDeadline_Call struct { // SetReadDeadline is a helper method to define mock.On call // - t time.Time -func (_e *MockConn_Expecter) SetReadDeadline(t interface{}) *MockConn_SetReadDeadline_Call { +func (_e *MockConn_Expecter) SetReadDeadline(t any) *MockConn_SetReadDeadline_Call { return &MockConn_SetReadDeadline_Call{Call: _e.mock.On("SetReadDeadline", t)} } func (_c *MockConn_SetReadDeadline_Call) Run(run func(t time.Time)) *MockConn_SetReadDeadline_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Time)) + var arg0 time.Time + if args[0] != nil { + arg0 = args[0].(time.Time) + } + run( + arg0, + ) }) return _c } -func (_c *MockConn_SetReadDeadline_Call) Return(_a0 error) *MockConn_SetReadDeadline_Call { - _c.Call.Return(_a0) +func (_c *MockConn_SetReadDeadline_Call) Return(err error) *MockConn_SetReadDeadline_Call { + _c.Call.Return(err) return _c } -func (_c *MockConn_SetReadDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetReadDeadline_Call { +func (_c *MockConn_SetReadDeadline_Call) RunAndReturn(run func(t time.Time) error) *MockConn_SetReadDeadline_Call { _c.Call.Return(run) return _c } -// SetWriteDeadline provides a mock function with given fields: t -func (_m *MockConn) SetWriteDeadline(t time.Time) error { - ret := _m.Called(t) +// SetWriteDeadline provides a mock function for the type MockConn +func (_mock *MockConn) SetWriteDeadline(t time.Time) error { + ret := _mock.Called(t) if len(ret) == 0 { panic("no return value specified for SetWriteDeadline") } var r0 error - if rf, ok := ret.Get(0).(func(time.Time) error); ok { - r0 = rf(t) + if returnFunc, ok := ret.Get(0).(func(time.Time) error); ok { + r0 = returnFunc(t) } else { r0 = ret.Error(0) } - return r0 } @@ -335,30 +360,36 @@ type MockConn_SetWriteDeadline_Call struct { // SetWriteDeadline is a helper method to define mock.On call // - t time.Time -func (_e *MockConn_Expecter) SetWriteDeadline(t interface{}) *MockConn_SetWriteDeadline_Call { +func (_e *MockConn_Expecter) SetWriteDeadline(t any) *MockConn_SetWriteDeadline_Call { return &MockConn_SetWriteDeadline_Call{Call: _e.mock.On("SetWriteDeadline", t)} } func (_c *MockConn_SetWriteDeadline_Call) Run(run func(t time.Time)) *MockConn_SetWriteDeadline_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Time)) + var arg0 time.Time + if args[0] != nil { + arg0 = args[0].(time.Time) + } + run( + arg0, + ) }) return _c } -func (_c *MockConn_SetWriteDeadline_Call) Return(_a0 error) *MockConn_SetWriteDeadline_Call { - _c.Call.Return(_a0) +func (_c *MockConn_SetWriteDeadline_Call) Return(err error) *MockConn_SetWriteDeadline_Call { + _c.Call.Return(err) return _c } -func (_c *MockConn_SetWriteDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetWriteDeadline_Call { +func (_c *MockConn_SetWriteDeadline_Call) RunAndReturn(run func(t time.Time) error) *MockConn_SetWriteDeadline_Call { _c.Call.Return(run) return _c } -// Write provides a mock function with given fields: b -func (_m *MockConn) Write(b []byte) (int, error) { - ret := _m.Called(b) +// Write provides a mock function for the type MockConn +func (_mock *MockConn) Write(b []byte) (int, error) { + ret := _mock.Called(b) if len(ret) == 0 { panic("no return value specified for Write") @@ -366,21 +397,19 @@ func (_m *MockConn) Write(b []byte) (int, error) { var r0 int var r1 error - if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { - return rf(b) + if returnFunc, ok := ret.Get(0).(func([]byte) (int, error)); ok { + return returnFunc(b) } - if rf, ok := ret.Get(0).(func([]byte) int); ok { - r0 = rf(b) + if returnFunc, ok := ret.Get(0).(func([]byte) int); ok { + r0 = returnFunc(b) } else { r0 = ret.Get(0).(int) } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(b) + if returnFunc, ok := ret.Get(1).(func([]byte) error); ok { + r1 = returnFunc(b) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -391,13 +420,19 @@ type MockConn_Write_Call struct { // Write is a helper method to define mock.On call // - b []byte -func (_e *MockConn_Expecter) Write(b interface{}) *MockConn_Write_Call { +func (_e *MockConn_Expecter) Write(b any) *MockConn_Write_Call { return &MockConn_Write_Call{Call: _e.mock.On("Write", b)} } func (_c *MockConn_Write_Call) Run(run func(b []byte)) *MockConn_Write_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) + var arg0 []byte + if args[0] != nil { + arg0 = args[0].([]byte) + } + run( + arg0, + ) }) return _c } @@ -407,21 +442,7 @@ func (_c *MockConn_Write_Call) Return(n int, err error) *MockConn_Write_Call { return _c } -func (_c *MockConn_Write_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Write_Call { +func (_c *MockConn_Write_Call) RunAndReturn(run func(b []byte) (int, error)) *MockConn_Write_Call { _c.Call.Return(run) return _c } - -// NewMockConn creates a new instance of MockConn. 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 NewMockConn(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConn { - mock := &MockConn{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/network/mock_Backend.go b/core/internal/mocks/network/mock_Backend.go index d7eb2df2..da31780d 100644 --- a/core/internal/mocks/network/mock_Backend.go +++ b/core/internal/mocks/network/mock_Backend.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_network import ( - network "github.com/AvengeMedia/DankMaterialShell/core/internal/server/network" + "github.com/AvengeMedia/DankMaterialShell/core/internal/server/network" mock "github.com/stretchr/testify/mock" ) +// NewMockBackend creates a new instance of MockBackend. 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 NewMockBackend(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBackend { + mock := &MockBackend{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockBackend is an autogenerated mock type for the Backend type type MockBackend struct { mock.Mock @@ -20,21 +36,20 @@ func (_m *MockBackend) EXPECT() *MockBackend_Expecter { return &MockBackend_Expecter{mock: &_m.Mock} } -// ActivateWiredConnection provides a mock function with given fields: uuid -func (_m *MockBackend) ActivateWiredConnection(uuid string) error { - ret := _m.Called(uuid) +// ActivateWiredConnection provides a mock function for the type MockBackend +func (_mock *MockBackend) ActivateWiredConnection(uuid string) error { + ret := _mock.Called(uuid) if len(ret) == 0 { panic("no return value specified for ActivateWiredConnection") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(uuid) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(uuid) } else { r0 = ret.Error(0) } - return r0 } @@ -45,42 +60,47 @@ type MockBackend_ActivateWiredConnection_Call struct { // ActivateWiredConnection is a helper method to define mock.On call // - uuid string -func (_e *MockBackend_Expecter) ActivateWiredConnection(uuid interface{}) *MockBackend_ActivateWiredConnection_Call { +func (_e *MockBackend_Expecter) ActivateWiredConnection(uuid any) *MockBackend_ActivateWiredConnection_Call { return &MockBackend_ActivateWiredConnection_Call{Call: _e.mock.On("ActivateWiredConnection", uuid)} } func (_c *MockBackend_ActivateWiredConnection_Call) Run(run func(uuid string)) *MockBackend_ActivateWiredConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_ActivateWiredConnection_Call) Return(_a0 error) *MockBackend_ActivateWiredConnection_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ActivateWiredConnection_Call) Return(err error) *MockBackend_ActivateWiredConnection_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ActivateWiredConnection_Call) RunAndReturn(run func(string) error) *MockBackend_ActivateWiredConnection_Call { +func (_c *MockBackend_ActivateWiredConnection_Call) RunAndReturn(run func(uuid string) error) *MockBackend_ActivateWiredConnection_Call { _c.Call.Return(run) return _c } -// CancelCredentials provides a mock function with given fields: token -func (_m *MockBackend) CancelCredentials(token string) error { - ret := _m.Called(token) +// CancelCredentials provides a mock function for the type MockBackend +func (_mock *MockBackend) CancelCredentials(token string) error { + ret := _mock.Called(token) if len(ret) == 0 { panic("no return value specified for CancelCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(token) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(token) } else { r0 = ret.Error(0) } - return r0 } @@ -91,42 +111,47 @@ type MockBackend_CancelCredentials_Call struct { // CancelCredentials is a helper method to define mock.On call // - token string -func (_e *MockBackend_Expecter) CancelCredentials(token interface{}) *MockBackend_CancelCredentials_Call { +func (_e *MockBackend_Expecter) CancelCredentials(token any) *MockBackend_CancelCredentials_Call { return &MockBackend_CancelCredentials_Call{Call: _e.mock.On("CancelCredentials", token)} } func (_c *MockBackend_CancelCredentials_Call) Run(run func(token string)) *MockBackend_CancelCredentials_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_CancelCredentials_Call) Return(_a0 error) *MockBackend_CancelCredentials_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_CancelCredentials_Call) Return(err error) *MockBackend_CancelCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_CancelCredentials_Call) RunAndReturn(run func(string) error) *MockBackend_CancelCredentials_Call { +func (_c *MockBackend_CancelCredentials_Call) RunAndReturn(run func(token string) error) *MockBackend_CancelCredentials_Call { _c.Call.Return(run) return _c } -// ClearVPNCredentials provides a mock function with given fields: uuidOrName -func (_m *MockBackend) ClearVPNCredentials(uuidOrName string) error { - ret := _m.Called(uuidOrName) +// ClearVPNCredentials provides a mock function for the type MockBackend +func (_mock *MockBackend) ClearVPNCredentials(uuidOrName string) error { + ret := _mock.Called(uuidOrName) if len(ret) == 0 { panic("no return value specified for ClearVPNCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(uuidOrName) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(uuidOrName) } else { r0 = ret.Error(0) } - return r0 } @@ -137,30 +162,37 @@ type MockBackend_ClearVPNCredentials_Call struct { // ClearVPNCredentials is a helper method to define mock.On call // - uuidOrName string -func (_e *MockBackend_Expecter) ClearVPNCredentials(uuidOrName interface{}) *MockBackend_ClearVPNCredentials_Call { +func (_e *MockBackend_Expecter) ClearVPNCredentials(uuidOrName any) *MockBackend_ClearVPNCredentials_Call { return &MockBackend_ClearVPNCredentials_Call{Call: _e.mock.On("ClearVPNCredentials", uuidOrName)} } func (_c *MockBackend_ClearVPNCredentials_Call) Run(run func(uuidOrName string)) *MockBackend_ClearVPNCredentials_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_ClearVPNCredentials_Call) Return(_a0 error) *MockBackend_ClearVPNCredentials_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ClearVPNCredentials_Call) Return(err error) *MockBackend_ClearVPNCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ClearVPNCredentials_Call) RunAndReturn(run func(string) error) *MockBackend_ClearVPNCredentials_Call { +func (_c *MockBackend_ClearVPNCredentials_Call) RunAndReturn(run func(uuidOrName string) error) *MockBackend_ClearVPNCredentials_Call { _c.Call.Return(run) return _c } -// Close provides a mock function with no fields -func (_m *MockBackend) Close() { - _m.Called() +// Close provides a mock function for the type MockBackend +func (_mock *MockBackend) Close() { + _mock.Called() + return } // MockBackend_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' @@ -190,21 +222,20 @@ func (_c *MockBackend_Close_Call) RunAndReturn(run func()) *MockBackend_Close_Ca return _c } -// ConnectEthernet provides a mock function with no fields -func (_m *MockBackend) ConnectEthernet() error { - ret := _m.Called() +// ConnectEthernet provides a mock function for the type MockBackend +func (_mock *MockBackend) ConnectEthernet() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ConnectEthernet") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -225,8 +256,8 @@ func (_c *MockBackend_ConnectEthernet_Call) Run(run func()) *MockBackend_Connect return _c } -func (_c *MockBackend_ConnectEthernet_Call) Return(_a0 error) *MockBackend_ConnectEthernet_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ConnectEthernet_Call) Return(err error) *MockBackend_ConnectEthernet_Call { + _c.Call.Return(err) return _c } @@ -235,21 +266,20 @@ func (_c *MockBackend_ConnectEthernet_Call) RunAndReturn(run func() error) *Mock return _c } -// ConnectVPN provides a mock function with given fields: uuidOrName, singleActive -func (_m *MockBackend) ConnectVPN(uuidOrName string, singleActive bool) error { - ret := _m.Called(uuidOrName, singleActive) +// ConnectVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) ConnectVPN(uuidOrName string, singleActive bool) error { + ret := _mock.Called(uuidOrName, singleActive) if len(ret) == 0 { panic("no return value specified for ConnectVPN") } var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(uuidOrName, singleActive) + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(uuidOrName, singleActive) } else { r0 = ret.Error(0) } - return r0 } @@ -261,42 +291,52 @@ type MockBackend_ConnectVPN_Call struct { // ConnectVPN is a helper method to define mock.On call // - uuidOrName string // - singleActive bool -func (_e *MockBackend_Expecter) ConnectVPN(uuidOrName interface{}, singleActive interface{}) *MockBackend_ConnectVPN_Call { +func (_e *MockBackend_Expecter) ConnectVPN(uuidOrName any, singleActive any) *MockBackend_ConnectVPN_Call { return &MockBackend_ConnectVPN_Call{Call: _e.mock.On("ConnectVPN", uuidOrName, singleActive)} } func (_c *MockBackend_ConnectVPN_Call) Run(run func(uuidOrName string, singleActive bool)) *MockBackend_ConnectVPN_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBackend_ConnectVPN_Call) Return(_a0 error) *MockBackend_ConnectVPN_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ConnectVPN_Call) Return(err error) *MockBackend_ConnectVPN_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ConnectVPN_Call) RunAndReturn(run func(string, bool) error) *MockBackend_ConnectVPN_Call { +func (_c *MockBackend_ConnectVPN_Call) RunAndReturn(run func(uuidOrName string, singleActive bool) error) *MockBackend_ConnectVPN_Call { _c.Call.Return(run) return _c } -// ConnectWiFi provides a mock function with given fields: req -func (_m *MockBackend) ConnectWiFi(req network.ConnectionRequest) error { - ret := _m.Called(req) +// ConnectWiFi provides a mock function for the type MockBackend +func (_mock *MockBackend) ConnectWiFi(req network.ConnectionRequest) error { + ret := _mock.Called(req) if len(ret) == 0 { panic("no return value specified for ConnectWiFi") } var r0 error - if rf, ok := ret.Get(0).(func(network.ConnectionRequest) error); ok { - r0 = rf(req) + if returnFunc, ok := ret.Get(0).(func(network.ConnectionRequest) error); ok { + r0 = returnFunc(req) } else { r0 = ret.Error(0) } - return r0 } @@ -307,42 +347,47 @@ type MockBackend_ConnectWiFi_Call struct { // ConnectWiFi is a helper method to define mock.On call // - req network.ConnectionRequest -func (_e *MockBackend_Expecter) ConnectWiFi(req interface{}) *MockBackend_ConnectWiFi_Call { +func (_e *MockBackend_Expecter) ConnectWiFi(req any) *MockBackend_ConnectWiFi_Call { return &MockBackend_ConnectWiFi_Call{Call: _e.mock.On("ConnectWiFi", req)} } func (_c *MockBackend_ConnectWiFi_Call) Run(run func(req network.ConnectionRequest)) *MockBackend_ConnectWiFi_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(network.ConnectionRequest)) + var arg0 network.ConnectionRequest + if args[0] != nil { + arg0 = args[0].(network.ConnectionRequest) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_ConnectWiFi_Call) Return(_a0 error) *MockBackend_ConnectWiFi_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ConnectWiFi_Call) Return(err error) *MockBackend_ConnectWiFi_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ConnectWiFi_Call) RunAndReturn(run func(network.ConnectionRequest) error) *MockBackend_ConnectWiFi_Call { +func (_c *MockBackend_ConnectWiFi_Call) RunAndReturn(run func(req network.ConnectionRequest) error) *MockBackend_ConnectWiFi_Call { _c.Call.Return(run) return _c } -// DeleteVPN provides a mock function with given fields: uuidOrName -func (_m *MockBackend) DeleteVPN(uuidOrName string) error { - ret := _m.Called(uuidOrName) +// DeleteVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) DeleteVPN(uuidOrName string) error { + ret := _mock.Called(uuidOrName) if len(ret) == 0 { panic("no return value specified for DeleteVPN") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(uuidOrName) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(uuidOrName) } else { r0 = ret.Error(0) } - return r0 } @@ -353,42 +398,47 @@ type MockBackend_DeleteVPN_Call struct { // DeleteVPN is a helper method to define mock.On call // - uuidOrName string -func (_e *MockBackend_Expecter) DeleteVPN(uuidOrName interface{}) *MockBackend_DeleteVPN_Call { +func (_e *MockBackend_Expecter) DeleteVPN(uuidOrName any) *MockBackend_DeleteVPN_Call { return &MockBackend_DeleteVPN_Call{Call: _e.mock.On("DeleteVPN", uuidOrName)} } func (_c *MockBackend_DeleteVPN_Call) Run(run func(uuidOrName string)) *MockBackend_DeleteVPN_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_DeleteVPN_Call) Return(_a0 error) *MockBackend_DeleteVPN_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DeleteVPN_Call) Return(err error) *MockBackend_DeleteVPN_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_DeleteVPN_Call) RunAndReturn(run func(string) error) *MockBackend_DeleteVPN_Call { +func (_c *MockBackend_DeleteVPN_Call) RunAndReturn(run func(uuidOrName string) error) *MockBackend_DeleteVPN_Call { _c.Call.Return(run) return _c } -// DisconnectAllVPN provides a mock function with no fields -func (_m *MockBackend) DisconnectAllVPN() error { - ret := _m.Called() +// DisconnectAllVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectAllVPN() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for DisconnectAllVPN") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -409,8 +459,8 @@ func (_c *MockBackend_DisconnectAllVPN_Call) Run(run func()) *MockBackend_Discon return _c } -func (_c *MockBackend_DisconnectAllVPN_Call) Return(_a0 error) *MockBackend_DisconnectAllVPN_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectAllVPN_Call) Return(err error) *MockBackend_DisconnectAllVPN_Call { + _c.Call.Return(err) return _c } @@ -419,21 +469,20 @@ func (_c *MockBackend_DisconnectAllVPN_Call) RunAndReturn(run func() error) *Moc return _c } -// DisconnectEthernet provides a mock function with no fields -func (_m *MockBackend) DisconnectEthernet() error { - ret := _m.Called() +// DisconnectEthernet provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectEthernet() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for DisconnectEthernet") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -454,8 +503,8 @@ func (_c *MockBackend_DisconnectEthernet_Call) Run(run func()) *MockBackend_Disc return _c } -func (_c *MockBackend_DisconnectEthernet_Call) Return(_a0 error) *MockBackend_DisconnectEthernet_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectEthernet_Call) Return(err error) *MockBackend_DisconnectEthernet_Call { + _c.Call.Return(err) return _c } @@ -464,21 +513,20 @@ func (_c *MockBackend_DisconnectEthernet_Call) RunAndReturn(run func() error) *M return _c } -// DisconnectEthernetDevice provides a mock function with given fields: device -func (_m *MockBackend) DisconnectEthernetDevice(device string) error { - ret := _m.Called(device) +// DisconnectEthernetDevice provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectEthernetDevice(device string) error { + ret := _mock.Called(device) if len(ret) == 0 { panic("no return value specified for DisconnectEthernetDevice") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(device) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(device) } else { r0 = ret.Error(0) } - return r0 } @@ -489,42 +537,47 @@ type MockBackend_DisconnectEthernetDevice_Call struct { // DisconnectEthernetDevice is a helper method to define mock.On call // - device string -func (_e *MockBackend_Expecter) DisconnectEthernetDevice(device interface{}) *MockBackend_DisconnectEthernetDevice_Call { +func (_e *MockBackend_Expecter) DisconnectEthernetDevice(device any) *MockBackend_DisconnectEthernetDevice_Call { return &MockBackend_DisconnectEthernetDevice_Call{Call: _e.mock.On("DisconnectEthernetDevice", device)} } func (_c *MockBackend_DisconnectEthernetDevice_Call) Run(run func(device string)) *MockBackend_DisconnectEthernetDevice_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_DisconnectEthernetDevice_Call) Return(_a0 error) *MockBackend_DisconnectEthernetDevice_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectEthernetDevice_Call) Return(err error) *MockBackend_DisconnectEthernetDevice_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_DisconnectEthernetDevice_Call) RunAndReturn(run func(string) error) *MockBackend_DisconnectEthernetDevice_Call { +func (_c *MockBackend_DisconnectEthernetDevice_Call) RunAndReturn(run func(device string) error) *MockBackend_DisconnectEthernetDevice_Call { _c.Call.Return(run) return _c } -// DisconnectVPN provides a mock function with given fields: uuidOrName -func (_m *MockBackend) DisconnectVPN(uuidOrName string) error { - ret := _m.Called(uuidOrName) +// DisconnectVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectVPN(uuidOrName string) error { + ret := _mock.Called(uuidOrName) if len(ret) == 0 { panic("no return value specified for DisconnectVPN") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(uuidOrName) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(uuidOrName) } else { r0 = ret.Error(0) } - return r0 } @@ -535,42 +588,47 @@ type MockBackend_DisconnectVPN_Call struct { // DisconnectVPN is a helper method to define mock.On call // - uuidOrName string -func (_e *MockBackend_Expecter) DisconnectVPN(uuidOrName interface{}) *MockBackend_DisconnectVPN_Call { +func (_e *MockBackend_Expecter) DisconnectVPN(uuidOrName any) *MockBackend_DisconnectVPN_Call { return &MockBackend_DisconnectVPN_Call{Call: _e.mock.On("DisconnectVPN", uuidOrName)} } func (_c *MockBackend_DisconnectVPN_Call) Run(run func(uuidOrName string)) *MockBackend_DisconnectVPN_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_DisconnectVPN_Call) Return(_a0 error) *MockBackend_DisconnectVPN_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectVPN_Call) Return(err error) *MockBackend_DisconnectVPN_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_DisconnectVPN_Call) RunAndReturn(run func(string) error) *MockBackend_DisconnectVPN_Call { +func (_c *MockBackend_DisconnectVPN_Call) RunAndReturn(run func(uuidOrName string) error) *MockBackend_DisconnectVPN_Call { _c.Call.Return(run) return _c } -// DisconnectWiFi provides a mock function with no fields -func (_m *MockBackend) DisconnectWiFi() error { - ret := _m.Called() +// DisconnectWiFi provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectWiFi() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for DisconnectWiFi") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -591,8 +649,8 @@ func (_c *MockBackend_DisconnectWiFi_Call) Run(run func()) *MockBackend_Disconne return _c } -func (_c *MockBackend_DisconnectWiFi_Call) Return(_a0 error) *MockBackend_DisconnectWiFi_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectWiFi_Call) Return(err error) *MockBackend_DisconnectWiFi_Call { + _c.Call.Return(err) return _c } @@ -601,21 +659,20 @@ func (_c *MockBackend_DisconnectWiFi_Call) RunAndReturn(run func() error) *MockB return _c } -// DisconnectWiFiDevice provides a mock function with given fields: device -func (_m *MockBackend) DisconnectWiFiDevice(device string) error { - ret := _m.Called(device) +// DisconnectWiFiDevice provides a mock function for the type MockBackend +func (_mock *MockBackend) DisconnectWiFiDevice(device string) error { + ret := _mock.Called(device) if len(ret) == 0 { panic("no return value specified for DisconnectWiFiDevice") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(device) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(device) } else { r0 = ret.Error(0) } - return r0 } @@ -626,42 +683,47 @@ type MockBackend_DisconnectWiFiDevice_Call struct { // DisconnectWiFiDevice is a helper method to define mock.On call // - device string -func (_e *MockBackend_Expecter) DisconnectWiFiDevice(device interface{}) *MockBackend_DisconnectWiFiDevice_Call { +func (_e *MockBackend_Expecter) DisconnectWiFiDevice(device any) *MockBackend_DisconnectWiFiDevice_Call { return &MockBackend_DisconnectWiFiDevice_Call{Call: _e.mock.On("DisconnectWiFiDevice", device)} } func (_c *MockBackend_DisconnectWiFiDevice_Call) Run(run func(device string)) *MockBackend_DisconnectWiFiDevice_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_DisconnectWiFiDevice_Call) Return(_a0 error) *MockBackend_DisconnectWiFiDevice_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_DisconnectWiFiDevice_Call) Return(err error) *MockBackend_DisconnectWiFiDevice_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_DisconnectWiFiDevice_Call) RunAndReturn(run func(string) error) *MockBackend_DisconnectWiFiDevice_Call { +func (_c *MockBackend_DisconnectWiFiDevice_Call) RunAndReturn(run func(device string) error) *MockBackend_DisconnectWiFiDevice_Call { _c.Call.Return(run) return _c } -// ForgetWiFiNetwork provides a mock function with given fields: ssid -func (_m *MockBackend) ForgetWiFiNetwork(ssid string) error { - ret := _m.Called(ssid) +// ForgetWiFiNetwork provides a mock function for the type MockBackend +func (_mock *MockBackend) ForgetWiFiNetwork(ssid string) error { + ret := _mock.Called(ssid) if len(ret) == 0 { panic("no return value specified for ForgetWiFiNetwork") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(ssid) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(ssid) } else { r0 = ret.Error(0) } - return r0 } @@ -672,30 +734,36 @@ type MockBackend_ForgetWiFiNetwork_Call struct { // ForgetWiFiNetwork is a helper method to define mock.On call // - ssid string -func (_e *MockBackend_Expecter) ForgetWiFiNetwork(ssid interface{}) *MockBackend_ForgetWiFiNetwork_Call { +func (_e *MockBackend_Expecter) ForgetWiFiNetwork(ssid any) *MockBackend_ForgetWiFiNetwork_Call { return &MockBackend_ForgetWiFiNetwork_Call{Call: _e.mock.On("ForgetWiFiNetwork", ssid)} } func (_c *MockBackend_ForgetWiFiNetwork_Call) Run(run func(ssid string)) *MockBackend_ForgetWiFiNetwork_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_ForgetWiFiNetwork_Call) Return(_a0 error) *MockBackend_ForgetWiFiNetwork_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ForgetWiFiNetwork_Call) Return(err error) *MockBackend_ForgetWiFiNetwork_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ForgetWiFiNetwork_Call) RunAndReturn(run func(string) error) *MockBackend_ForgetWiFiNetwork_Call { +func (_c *MockBackend_ForgetWiFiNetwork_Call) RunAndReturn(run func(ssid string) error) *MockBackend_ForgetWiFiNetwork_Call { _c.Call.Return(run) return _c } -// GetCurrentState provides a mock function with no fields -func (_m *MockBackend) GetCurrentState() (*network.BackendState, error) { - ret := _m.Called() +// GetCurrentState provides a mock function for the type MockBackend +func (_mock *MockBackend) GetCurrentState() (*network.BackendState, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetCurrentState") @@ -703,23 +771,21 @@ func (_m *MockBackend) GetCurrentState() (*network.BackendState, error) { var r0 *network.BackendState var r1 error - if rf, ok := ret.Get(0).(func() (*network.BackendState, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*network.BackendState, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *network.BackendState); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *network.BackendState); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*network.BackendState) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -740,8 +806,8 @@ func (_c *MockBackend_GetCurrentState_Call) Run(run func()) *MockBackend_GetCurr return _c } -func (_c *MockBackend_GetCurrentState_Call) Return(_a0 *network.BackendState, _a1 error) *MockBackend_GetCurrentState_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetCurrentState_Call) Return(backendState *network.BackendState, err error) *MockBackend_GetCurrentState_Call { + _c.Call.Return(backendState, err) return _c } @@ -750,23 +816,22 @@ func (_c *MockBackend_GetCurrentState_Call) RunAndReturn(run func() (*network.Ba return _c } -// GetEthernetDevices provides a mock function with no fields -func (_m *MockBackend) GetEthernetDevices() []network.EthernetDevice { - ret := _m.Called() +// GetEthernetDevices provides a mock function for the type MockBackend +func (_mock *MockBackend) GetEthernetDevices() []network.EthernetDevice { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetEthernetDevices") } var r0 []network.EthernetDevice - if rf, ok := ret.Get(0).(func() []network.EthernetDevice); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.EthernetDevice); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.EthernetDevice) } } - return r0 } @@ -787,8 +852,8 @@ func (_c *MockBackend_GetEthernetDevices_Call) Run(run func()) *MockBackend_GetE return _c } -func (_c *MockBackend_GetEthernetDevices_Call) Return(_a0 []network.EthernetDevice) *MockBackend_GetEthernetDevices_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_GetEthernetDevices_Call) Return(ethernetDevices []network.EthernetDevice) *MockBackend_GetEthernetDevices_Call { + _c.Call.Return(ethernetDevices) return _c } @@ -797,23 +862,22 @@ func (_c *MockBackend_GetEthernetDevices_Call) RunAndReturn(run func() []network return _c } -// GetPromptBroker provides a mock function with no fields -func (_m *MockBackend) GetPromptBroker() network.PromptBroker { - ret := _m.Called() +// GetPromptBroker provides a mock function for the type MockBackend +func (_mock *MockBackend) GetPromptBroker() network.PromptBroker { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPromptBroker") } var r0 network.PromptBroker - if rf, ok := ret.Get(0).(func() network.PromptBroker); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() network.PromptBroker); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(network.PromptBroker) } } - return r0 } @@ -834,8 +898,8 @@ func (_c *MockBackend_GetPromptBroker_Call) Run(run func()) *MockBackend_GetProm return _c } -func (_c *MockBackend_GetPromptBroker_Call) Return(_a0 network.PromptBroker) *MockBackend_GetPromptBroker_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_GetPromptBroker_Call) Return(promptBroker network.PromptBroker) *MockBackend_GetPromptBroker_Call { + _c.Call.Return(promptBroker) return _c } @@ -844,9 +908,9 @@ func (_c *MockBackend_GetPromptBroker_Call) RunAndReturn(run func() network.Prom return _c } -// GetVPNConfig provides a mock function with given fields: uuidOrName -func (_m *MockBackend) GetVPNConfig(uuidOrName string) (*network.VPNConfig, error) { - ret := _m.Called(uuidOrName) +// GetVPNConfig provides a mock function for the type MockBackend +func (_mock *MockBackend) GetVPNConfig(uuidOrName string) (*network.VPNConfig, error) { + ret := _mock.Called(uuidOrName) if len(ret) == 0 { panic("no return value specified for GetVPNConfig") @@ -854,23 +918,21 @@ func (_m *MockBackend) GetVPNConfig(uuidOrName string) (*network.VPNConfig, erro var r0 *network.VPNConfig var r1 error - if rf, ok := ret.Get(0).(func(string) (*network.VPNConfig, error)); ok { - return rf(uuidOrName) + if returnFunc, ok := ret.Get(0).(func(string) (*network.VPNConfig, error)); ok { + return returnFunc(uuidOrName) } - if rf, ok := ret.Get(0).(func(string) *network.VPNConfig); ok { - r0 = rf(uuidOrName) + if returnFunc, ok := ret.Get(0).(func(string) *network.VPNConfig); ok { + r0 = returnFunc(uuidOrName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*network.VPNConfig) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(uuidOrName) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(uuidOrName) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -881,44 +943,49 @@ type MockBackend_GetVPNConfig_Call struct { // GetVPNConfig is a helper method to define mock.On call // - uuidOrName string -func (_e *MockBackend_Expecter) GetVPNConfig(uuidOrName interface{}) *MockBackend_GetVPNConfig_Call { +func (_e *MockBackend_Expecter) GetVPNConfig(uuidOrName any) *MockBackend_GetVPNConfig_Call { return &MockBackend_GetVPNConfig_Call{Call: _e.mock.On("GetVPNConfig", uuidOrName)} } func (_c *MockBackend_GetVPNConfig_Call) Run(run func(uuidOrName string)) *MockBackend_GetVPNConfig_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_GetVPNConfig_Call) Return(_a0 *network.VPNConfig, _a1 error) *MockBackend_GetVPNConfig_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetVPNConfig_Call) Return(vPNConfig *network.VPNConfig, err error) *MockBackend_GetVPNConfig_Call { + _c.Call.Return(vPNConfig, err) return _c } -func (_c *MockBackend_GetVPNConfig_Call) RunAndReturn(run func(string) (*network.VPNConfig, error)) *MockBackend_GetVPNConfig_Call { +func (_c *MockBackend_GetVPNConfig_Call) RunAndReturn(run func(uuidOrName string) (*network.VPNConfig, error)) *MockBackend_GetVPNConfig_Call { _c.Call.Return(run) return _c } -// GetWiFiDevices provides a mock function with no fields -func (_m *MockBackend) GetWiFiDevices() []network.WiFiDevice { - ret := _m.Called() +// GetWiFiDevices provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiFiDevices() []network.WiFiDevice { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetWiFiDevices") } var r0 []network.WiFiDevice - if rf, ok := ret.Get(0).(func() []network.WiFiDevice); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.WiFiDevice); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.WiFiDevice) } } - return r0 } @@ -939,8 +1006,8 @@ func (_c *MockBackend_GetWiFiDevices_Call) Run(run func()) *MockBackend_GetWiFiD return _c } -func (_c *MockBackend_GetWiFiDevices_Call) Return(_a0 []network.WiFiDevice) *MockBackend_GetWiFiDevices_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_GetWiFiDevices_Call) Return(wiFiDevices []network.WiFiDevice) *MockBackend_GetWiFiDevices_Call { + _c.Call.Return(wiFiDevices) return _c } @@ -949,9 +1016,9 @@ func (_c *MockBackend_GetWiFiDevices_Call) RunAndReturn(run func() []network.WiF return _c } -// GetWiFiEnabled provides a mock function with no fields -func (_m *MockBackend) GetWiFiEnabled() (bool, error) { - ret := _m.Called() +// GetWiFiEnabled provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiFiEnabled() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetWiFiEnabled") @@ -959,21 +1026,19 @@ func (_m *MockBackend) GetWiFiEnabled() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -994,8 +1059,8 @@ func (_c *MockBackend_GetWiFiEnabled_Call) Run(run func()) *MockBackend_GetWiFiE return _c } -func (_c *MockBackend_GetWiFiEnabled_Call) Return(_a0 bool, _a1 error) *MockBackend_GetWiFiEnabled_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetWiFiEnabled_Call) Return(b bool, err error) *MockBackend_GetWiFiEnabled_Call { + _c.Call.Return(b, err) return _c } @@ -1004,9 +1069,9 @@ func (_c *MockBackend_GetWiFiEnabled_Call) RunAndReturn(run func() (bool, error) return _c } -// GetWiFiNetworkDetails provides a mock function with given fields: ssid -func (_m *MockBackend) GetWiFiNetworkDetails(ssid string) (*network.NetworkInfoResponse, error) { - ret := _m.Called(ssid) +// GetWiFiNetworkDetails provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiFiNetworkDetails(ssid string) (*network.NetworkInfoResponse, error) { + ret := _mock.Called(ssid) if len(ret) == 0 { panic("no return value specified for GetWiFiNetworkDetails") @@ -1014,23 +1079,21 @@ func (_m *MockBackend) GetWiFiNetworkDetails(ssid string) (*network.NetworkInfoR var r0 *network.NetworkInfoResponse var r1 error - if rf, ok := ret.Get(0).(func(string) (*network.NetworkInfoResponse, error)); ok { - return rf(ssid) + if returnFunc, ok := ret.Get(0).(func(string) (*network.NetworkInfoResponse, error)); ok { + return returnFunc(ssid) } - if rf, ok := ret.Get(0).(func(string) *network.NetworkInfoResponse); ok { - r0 = rf(ssid) + if returnFunc, ok := ret.Get(0).(func(string) *network.NetworkInfoResponse); ok { + r0 = returnFunc(ssid) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*network.NetworkInfoResponse) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(ssid) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(ssid) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1041,30 +1104,36 @@ type MockBackend_GetWiFiNetworkDetails_Call struct { // GetWiFiNetworkDetails is a helper method to define mock.On call // - ssid string -func (_e *MockBackend_Expecter) GetWiFiNetworkDetails(ssid interface{}) *MockBackend_GetWiFiNetworkDetails_Call { +func (_e *MockBackend_Expecter) GetWiFiNetworkDetails(ssid any) *MockBackend_GetWiFiNetworkDetails_Call { return &MockBackend_GetWiFiNetworkDetails_Call{Call: _e.mock.On("GetWiFiNetworkDetails", ssid)} } func (_c *MockBackend_GetWiFiNetworkDetails_Call) Run(run func(ssid string)) *MockBackend_GetWiFiNetworkDetails_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_GetWiFiNetworkDetails_Call) Return(_a0 *network.NetworkInfoResponse, _a1 error) *MockBackend_GetWiFiNetworkDetails_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetWiFiNetworkDetails_Call) Return(networkInfoResponse *network.NetworkInfoResponse, err error) *MockBackend_GetWiFiNetworkDetails_Call { + _c.Call.Return(networkInfoResponse, err) return _c } -func (_c *MockBackend_GetWiFiNetworkDetails_Call) RunAndReturn(run func(string) (*network.NetworkInfoResponse, error)) *MockBackend_GetWiFiNetworkDetails_Call { +func (_c *MockBackend_GetWiFiNetworkDetails_Call) RunAndReturn(run func(ssid string) (*network.NetworkInfoResponse, error)) *MockBackend_GetWiFiNetworkDetails_Call { _c.Call.Return(run) return _c } -// GetWiFiQRCodeContent provides a mock function with given fields: ssid -func (_m *MockBackend) GetWiFiQRCodeContent(ssid string) (string, error) { - ret := _m.Called(ssid) +// GetWiFiQRCodeContent provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiFiQRCodeContent(ssid string) (string, error) { + ret := _mock.Called(ssid) if len(ret) == 0 { panic("no return value specified for GetWiFiQRCodeContent") @@ -1072,21 +1141,19 @@ func (_m *MockBackend) GetWiFiQRCodeContent(ssid string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(ssid) + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(ssid) } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(ssid) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(ssid) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(ssid) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(ssid) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1097,30 +1164,36 @@ type MockBackend_GetWiFiQRCodeContent_Call struct { // GetWiFiQRCodeContent is a helper method to define mock.On call // - ssid string -func (_e *MockBackend_Expecter) GetWiFiQRCodeContent(ssid interface{}) *MockBackend_GetWiFiQRCodeContent_Call { +func (_e *MockBackend_Expecter) GetWiFiQRCodeContent(ssid any) *MockBackend_GetWiFiQRCodeContent_Call { return &MockBackend_GetWiFiQRCodeContent_Call{Call: _e.mock.On("GetWiFiQRCodeContent", ssid)} } func (_c *MockBackend_GetWiFiQRCodeContent_Call) Run(run func(ssid string)) *MockBackend_GetWiFiQRCodeContent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_GetWiFiQRCodeContent_Call) Return(_a0 string, _a1 error) *MockBackend_GetWiFiQRCodeContent_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetWiFiQRCodeContent_Call) Return(s string, err error) *MockBackend_GetWiFiQRCodeContent_Call { + _c.Call.Return(s, err) return _c } -func (_c *MockBackend_GetWiFiQRCodeContent_Call) RunAndReturn(run func(string) (string, error)) *MockBackend_GetWiFiQRCodeContent_Call { +func (_c *MockBackend_GetWiFiQRCodeContent_Call) RunAndReturn(run func(ssid string) (string, error)) *MockBackend_GetWiFiQRCodeContent_Call { _c.Call.Return(run) return _c } -// GetWiredConnections provides a mock function with no fields -func (_m *MockBackend) GetWiredConnections() ([]network.WiredConnection, error) { - ret := _m.Called() +// GetWiredConnections provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiredConnections() ([]network.WiredConnection, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetWiredConnections") @@ -1128,23 +1201,21 @@ func (_m *MockBackend) GetWiredConnections() ([]network.WiredConnection, error) var r0 []network.WiredConnection var r1 error - if rf, ok := ret.Get(0).(func() ([]network.WiredConnection, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]network.WiredConnection, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []network.WiredConnection); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.WiredConnection); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.WiredConnection) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1165,8 +1236,8 @@ func (_c *MockBackend_GetWiredConnections_Call) Run(run func()) *MockBackend_Get return _c } -func (_c *MockBackend_GetWiredConnections_Call) Return(_a0 []network.WiredConnection, _a1 error) *MockBackend_GetWiredConnections_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetWiredConnections_Call) Return(wiredConnections []network.WiredConnection, err error) *MockBackend_GetWiredConnections_Call { + _c.Call.Return(wiredConnections, err) return _c } @@ -1175,9 +1246,9 @@ func (_c *MockBackend_GetWiredConnections_Call) RunAndReturn(run func() ([]netwo return _c } -// GetWiredNetworkDetails provides a mock function with given fields: uuid -func (_m *MockBackend) GetWiredNetworkDetails(uuid string) (*network.WiredNetworkInfoResponse, error) { - ret := _m.Called(uuid) +// GetWiredNetworkDetails provides a mock function for the type MockBackend +func (_mock *MockBackend) GetWiredNetworkDetails(uuid string) (*network.WiredNetworkInfoResponse, error) { + ret := _mock.Called(uuid) if len(ret) == 0 { panic("no return value specified for GetWiredNetworkDetails") @@ -1185,23 +1256,21 @@ func (_m *MockBackend) GetWiredNetworkDetails(uuid string) (*network.WiredNetwor var r0 *network.WiredNetworkInfoResponse var r1 error - if rf, ok := ret.Get(0).(func(string) (*network.WiredNetworkInfoResponse, error)); ok { - return rf(uuid) + if returnFunc, ok := ret.Get(0).(func(string) (*network.WiredNetworkInfoResponse, error)); ok { + return returnFunc(uuid) } - if rf, ok := ret.Get(0).(func(string) *network.WiredNetworkInfoResponse); ok { - r0 = rf(uuid) + if returnFunc, ok := ret.Get(0).(func(string) *network.WiredNetworkInfoResponse); ok { + r0 = returnFunc(uuid) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*network.WiredNetworkInfoResponse) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(uuid) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(uuid) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1212,30 +1281,36 @@ type MockBackend_GetWiredNetworkDetails_Call struct { // GetWiredNetworkDetails is a helper method to define mock.On call // - uuid string -func (_e *MockBackend_Expecter) GetWiredNetworkDetails(uuid interface{}) *MockBackend_GetWiredNetworkDetails_Call { +func (_e *MockBackend_Expecter) GetWiredNetworkDetails(uuid any) *MockBackend_GetWiredNetworkDetails_Call { return &MockBackend_GetWiredNetworkDetails_Call{Call: _e.mock.On("GetWiredNetworkDetails", uuid)} } func (_c *MockBackend_GetWiredNetworkDetails_Call) Run(run func(uuid string)) *MockBackend_GetWiredNetworkDetails_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_GetWiredNetworkDetails_Call) Return(_a0 *network.WiredNetworkInfoResponse, _a1 error) *MockBackend_GetWiredNetworkDetails_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_GetWiredNetworkDetails_Call) Return(wiredNetworkInfoResponse *network.WiredNetworkInfoResponse, err error) *MockBackend_GetWiredNetworkDetails_Call { + _c.Call.Return(wiredNetworkInfoResponse, err) return _c } -func (_c *MockBackend_GetWiredNetworkDetails_Call) RunAndReturn(run func(string) (*network.WiredNetworkInfoResponse, error)) *MockBackend_GetWiredNetworkDetails_Call { +func (_c *MockBackend_GetWiredNetworkDetails_Call) RunAndReturn(run func(uuid string) (*network.WiredNetworkInfoResponse, error)) *MockBackend_GetWiredNetworkDetails_Call { _c.Call.Return(run) return _c } -// ImportVPN provides a mock function with given fields: filePath, name -func (_m *MockBackend) ImportVPN(filePath string, name string) (*network.VPNImportResult, error) { - ret := _m.Called(filePath, name) +// ImportVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) ImportVPN(filePath string, name string) (*network.VPNImportResult, error) { + ret := _mock.Called(filePath, name) if len(ret) == 0 { panic("no return value specified for ImportVPN") @@ -1243,23 +1318,21 @@ func (_m *MockBackend) ImportVPN(filePath string, name string) (*network.VPNImpo var r0 *network.VPNImportResult var r1 error - if rf, ok := ret.Get(0).(func(string, string) (*network.VPNImportResult, error)); ok { - return rf(filePath, name) + if returnFunc, ok := ret.Get(0).(func(string, string) (*network.VPNImportResult, error)); ok { + return returnFunc(filePath, name) } - if rf, ok := ret.Get(0).(func(string, string) *network.VPNImportResult); ok { - r0 = rf(filePath, name) + if returnFunc, ok := ret.Get(0).(func(string, string) *network.VPNImportResult); ok { + r0 = returnFunc(filePath, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*network.VPNImportResult) } } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(filePath, name) + if returnFunc, ok := ret.Get(1).(func(string, string) error); ok { + r1 = returnFunc(filePath, name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1271,42 +1344,52 @@ type MockBackend_ImportVPN_Call struct { // ImportVPN is a helper method to define mock.On call // - filePath string // - name string -func (_e *MockBackend_Expecter) ImportVPN(filePath interface{}, name interface{}) *MockBackend_ImportVPN_Call { +func (_e *MockBackend_Expecter) ImportVPN(filePath any, name any) *MockBackend_ImportVPN_Call { return &MockBackend_ImportVPN_Call{Call: _e.mock.On("ImportVPN", filePath, name)} } func (_c *MockBackend_ImportVPN_Call) Run(run func(filePath string, name string)) *MockBackend_ImportVPN_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBackend_ImportVPN_Call) Return(_a0 *network.VPNImportResult, _a1 error) *MockBackend_ImportVPN_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_ImportVPN_Call) Return(vPNImportResult *network.VPNImportResult, err error) *MockBackend_ImportVPN_Call { + _c.Call.Return(vPNImportResult, err) return _c } -func (_c *MockBackend_ImportVPN_Call) RunAndReturn(run func(string, string) (*network.VPNImportResult, error)) *MockBackend_ImportVPN_Call { +func (_c *MockBackend_ImportVPN_Call) RunAndReturn(run func(filePath string, name string) (*network.VPNImportResult, error)) *MockBackend_ImportVPN_Call { _c.Call.Return(run) return _c } -// Initialize provides a mock function with no fields -func (_m *MockBackend) Initialize() error { - ret := _m.Called() +// Initialize provides a mock function for the type MockBackend +func (_mock *MockBackend) Initialize() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Initialize") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -1327,8 +1410,8 @@ func (_c *MockBackend_Initialize_Call) Run(run func()) *MockBackend_Initialize_C return _c } -func (_c *MockBackend_Initialize_Call) Return(_a0 error) *MockBackend_Initialize_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_Initialize_Call) Return(err error) *MockBackend_Initialize_Call { + _c.Call.Return(err) return _c } @@ -1337,9 +1420,9 @@ func (_c *MockBackend_Initialize_Call) RunAndReturn(run func() error) *MockBacke return _c } -// ListActiveVPN provides a mock function with no fields -func (_m *MockBackend) ListActiveVPN() ([]network.VPNActive, error) { - ret := _m.Called() +// ListActiveVPN provides a mock function for the type MockBackend +func (_mock *MockBackend) ListActiveVPN() ([]network.VPNActive, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ListActiveVPN") @@ -1347,23 +1430,21 @@ func (_m *MockBackend) ListActiveVPN() ([]network.VPNActive, error) { var r0 []network.VPNActive var r1 error - if rf, ok := ret.Get(0).(func() ([]network.VPNActive, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]network.VPNActive, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []network.VPNActive); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.VPNActive); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.VPNActive) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1384,8 +1465,8 @@ func (_c *MockBackend_ListActiveVPN_Call) Run(run func()) *MockBackend_ListActiv return _c } -func (_c *MockBackend_ListActiveVPN_Call) Return(_a0 []network.VPNActive, _a1 error) *MockBackend_ListActiveVPN_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_ListActiveVPN_Call) Return(vPNActives []network.VPNActive, err error) *MockBackend_ListActiveVPN_Call { + _c.Call.Return(vPNActives, err) return _c } @@ -1394,9 +1475,9 @@ func (_c *MockBackend_ListActiveVPN_Call) RunAndReturn(run func() ([]network.VPN return _c } -// ListVPNPlugins provides a mock function with no fields -func (_m *MockBackend) ListVPNPlugins() ([]network.VPNPlugin, error) { - ret := _m.Called() +// ListVPNPlugins provides a mock function for the type MockBackend +func (_mock *MockBackend) ListVPNPlugins() ([]network.VPNPlugin, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ListVPNPlugins") @@ -1404,23 +1485,21 @@ func (_m *MockBackend) ListVPNPlugins() ([]network.VPNPlugin, error) { var r0 []network.VPNPlugin var r1 error - if rf, ok := ret.Get(0).(func() ([]network.VPNPlugin, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]network.VPNPlugin, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []network.VPNPlugin); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.VPNPlugin); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.VPNPlugin) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1441,8 +1520,8 @@ func (_c *MockBackend_ListVPNPlugins_Call) Run(run func()) *MockBackend_ListVPNP return _c } -func (_c *MockBackend_ListVPNPlugins_Call) Return(_a0 []network.VPNPlugin, _a1 error) *MockBackend_ListVPNPlugins_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_ListVPNPlugins_Call) Return(vPNPlugins []network.VPNPlugin, err error) *MockBackend_ListVPNPlugins_Call { + _c.Call.Return(vPNPlugins, err) return _c } @@ -1451,9 +1530,9 @@ func (_c *MockBackend_ListVPNPlugins_Call) RunAndReturn(run func() ([]network.VP return _c } -// ListVPNProfiles provides a mock function with no fields -func (_m *MockBackend) ListVPNProfiles() ([]network.VPNProfile, error) { - ret := _m.Called() +// ListVPNProfiles provides a mock function for the type MockBackend +func (_mock *MockBackend) ListVPNProfiles() ([]network.VPNProfile, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ListVPNProfiles") @@ -1461,23 +1540,21 @@ func (_m *MockBackend) ListVPNProfiles() ([]network.VPNProfile, error) { var r0 []network.VPNProfile var r1 error - if rf, ok := ret.Get(0).(func() ([]network.VPNProfile, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]network.VPNProfile, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []network.VPNProfile); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []network.VPNProfile); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]network.VPNProfile) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1498,8 +1575,8 @@ func (_c *MockBackend_ListVPNProfiles_Call) Run(run func()) *MockBackend_ListVPN return _c } -func (_c *MockBackend_ListVPNProfiles_Call) Return(_a0 []network.VPNProfile, _a1 error) *MockBackend_ListVPNProfiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockBackend_ListVPNProfiles_Call) Return(vPNProfiles []network.VPNProfile, err error) *MockBackend_ListVPNProfiles_Call { + _c.Call.Return(vPNProfiles, err) return _c } @@ -1508,21 +1585,20 @@ func (_c *MockBackend_ListVPNProfiles_Call) RunAndReturn(run func() ([]network.V return _c } -// ScanWiFi provides a mock function with no fields -func (_m *MockBackend) ScanWiFi() error { - ret := _m.Called() +// ScanWiFi provides a mock function for the type MockBackend +func (_mock *MockBackend) ScanWiFi() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ScanWiFi") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -1543,8 +1619,8 @@ func (_c *MockBackend_ScanWiFi_Call) Run(run func()) *MockBackend_ScanWiFi_Call return _c } -func (_c *MockBackend_ScanWiFi_Call) Return(_a0 error) *MockBackend_ScanWiFi_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ScanWiFi_Call) Return(err error) *MockBackend_ScanWiFi_Call { + _c.Call.Return(err) return _c } @@ -1553,21 +1629,20 @@ func (_c *MockBackend_ScanWiFi_Call) RunAndReturn(run func() error) *MockBackend return _c } -// ScanWiFiDevice provides a mock function with given fields: device -func (_m *MockBackend) ScanWiFiDevice(device string) error { - ret := _m.Called(device) +// ScanWiFiDevice provides a mock function for the type MockBackend +func (_mock *MockBackend) ScanWiFiDevice(device string) error { + ret := _mock.Called(device) if len(ret) == 0 { panic("no return value specified for ScanWiFiDevice") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(device) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(device) } else { r0 = ret.Error(0) } - return r0 } @@ -1578,42 +1653,47 @@ type MockBackend_ScanWiFiDevice_Call struct { // ScanWiFiDevice is a helper method to define mock.On call // - device string -func (_e *MockBackend_Expecter) ScanWiFiDevice(device interface{}) *MockBackend_ScanWiFiDevice_Call { +func (_e *MockBackend_Expecter) ScanWiFiDevice(device any) *MockBackend_ScanWiFiDevice_Call { return &MockBackend_ScanWiFiDevice_Call{Call: _e.mock.On("ScanWiFiDevice", device)} } func (_c *MockBackend_ScanWiFiDevice_Call) Run(run func(device string)) *MockBackend_ScanWiFiDevice_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_ScanWiFiDevice_Call) Return(_a0 error) *MockBackend_ScanWiFiDevice_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_ScanWiFiDevice_Call) Return(err error) *MockBackend_ScanWiFiDevice_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_ScanWiFiDevice_Call) RunAndReturn(run func(string) error) *MockBackend_ScanWiFiDevice_Call { +func (_c *MockBackend_ScanWiFiDevice_Call) RunAndReturn(run func(device string) error) *MockBackend_ScanWiFiDevice_Call { _c.Call.Return(run) return _c } -// SetPromptBroker provides a mock function with given fields: broker -func (_m *MockBackend) SetPromptBroker(broker network.PromptBroker) error { - ret := _m.Called(broker) +// SetPromptBroker provides a mock function for the type MockBackend +func (_mock *MockBackend) SetPromptBroker(broker network.PromptBroker) error { + ret := _mock.Called(broker) if len(ret) == 0 { panic("no return value specified for SetPromptBroker") } var r0 error - if rf, ok := ret.Get(0).(func(network.PromptBroker) error); ok { - r0 = rf(broker) + if returnFunc, ok := ret.Get(0).(func(network.PromptBroker) error); ok { + r0 = returnFunc(broker) } else { r0 = ret.Error(0) } - return r0 } @@ -1624,42 +1704,47 @@ type MockBackend_SetPromptBroker_Call struct { // SetPromptBroker is a helper method to define mock.On call // - broker network.PromptBroker -func (_e *MockBackend_Expecter) SetPromptBroker(broker interface{}) *MockBackend_SetPromptBroker_Call { +func (_e *MockBackend_Expecter) SetPromptBroker(broker any) *MockBackend_SetPromptBroker_Call { return &MockBackend_SetPromptBroker_Call{Call: _e.mock.On("SetPromptBroker", broker)} } func (_c *MockBackend_SetPromptBroker_Call) Run(run func(broker network.PromptBroker)) *MockBackend_SetPromptBroker_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(network.PromptBroker)) + var arg0 network.PromptBroker + if args[0] != nil { + arg0 = args[0].(network.PromptBroker) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_SetPromptBroker_Call) Return(_a0 error) *MockBackend_SetPromptBroker_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_SetPromptBroker_Call) Return(err error) *MockBackend_SetPromptBroker_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_SetPromptBroker_Call) RunAndReturn(run func(network.PromptBroker) error) *MockBackend_SetPromptBroker_Call { +func (_c *MockBackend_SetPromptBroker_Call) RunAndReturn(run func(broker network.PromptBroker) error) *MockBackend_SetPromptBroker_Call { _c.Call.Return(run) return _c } -// SetVPNCredentials provides a mock function with given fields: uuid, username, password, save -func (_m *MockBackend) SetVPNCredentials(uuid string, username string, password string, save bool) error { - ret := _m.Called(uuid, username, password, save) +// SetVPNCredentials provides a mock function for the type MockBackend +func (_mock *MockBackend) SetVPNCredentials(uuid string, username string, password string, save bool) error { + ret := _mock.Called(uuid, username, password, save) if len(ret) == 0 { panic("no return value specified for SetVPNCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(string, string, string, bool) error); ok { - r0 = rf(uuid, username, password, save) + if returnFunc, ok := ret.Get(0).(func(string, string, string, bool) error); ok { + r0 = returnFunc(uuid, username, password, save) } else { r0 = ret.Error(0) } - return r0 } @@ -1673,42 +1758,62 @@ type MockBackend_SetVPNCredentials_Call struct { // - username string // - password string // - save bool -func (_e *MockBackend_Expecter) SetVPNCredentials(uuid interface{}, username interface{}, password interface{}, save interface{}) *MockBackend_SetVPNCredentials_Call { +func (_e *MockBackend_Expecter) SetVPNCredentials(uuid any, username any, password any, save any) *MockBackend_SetVPNCredentials_Call { return &MockBackend_SetVPNCredentials_Call{Call: _e.mock.On("SetVPNCredentials", uuid, username, password, save)} } func (_c *MockBackend_SetVPNCredentials_Call) Run(run func(uuid string, username string, password string, save bool)) *MockBackend_SetVPNCredentials_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(string), args[3].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } -func (_c *MockBackend_SetVPNCredentials_Call) Return(_a0 error) *MockBackend_SetVPNCredentials_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_SetVPNCredentials_Call) Return(err error) *MockBackend_SetVPNCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_SetVPNCredentials_Call) RunAndReturn(run func(string, string, string, bool) error) *MockBackend_SetVPNCredentials_Call { +func (_c *MockBackend_SetVPNCredentials_Call) RunAndReturn(run func(uuid string, username string, password string, save bool) error) *MockBackend_SetVPNCredentials_Call { _c.Call.Return(run) return _c } -// SetWiFiAutoconnect provides a mock function with given fields: ssid, autoconnect -func (_m *MockBackend) SetWiFiAutoconnect(ssid string, autoconnect bool) error { - ret := _m.Called(ssid, autoconnect) +// SetWiFiAutoconnect provides a mock function for the type MockBackend +func (_mock *MockBackend) SetWiFiAutoconnect(ssid string, autoconnect bool) error { + ret := _mock.Called(ssid, autoconnect) if len(ret) == 0 { panic("no return value specified for SetWiFiAutoconnect") } var r0 error - if rf, ok := ret.Get(0).(func(string, bool) error); ok { - r0 = rf(ssid, autoconnect) + if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok { + r0 = returnFunc(ssid, autoconnect) } else { r0 = ret.Error(0) } - return r0 } @@ -1720,42 +1825,52 @@ type MockBackend_SetWiFiAutoconnect_Call struct { // SetWiFiAutoconnect is a helper method to define mock.On call // - ssid string // - autoconnect bool -func (_e *MockBackend_Expecter) SetWiFiAutoconnect(ssid interface{}, autoconnect interface{}) *MockBackend_SetWiFiAutoconnect_Call { +func (_e *MockBackend_Expecter) SetWiFiAutoconnect(ssid any, autoconnect any) *MockBackend_SetWiFiAutoconnect_Call { return &MockBackend_SetWiFiAutoconnect_Call{Call: _e.mock.On("SetWiFiAutoconnect", ssid, autoconnect)} } func (_c *MockBackend_SetWiFiAutoconnect_Call) Run(run func(ssid string, autoconnect bool)) *MockBackend_SetWiFiAutoconnect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 bool + if args[1] != nil { + arg1 = args[1].(bool) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBackend_SetWiFiAutoconnect_Call) Return(_a0 error) *MockBackend_SetWiFiAutoconnect_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_SetWiFiAutoconnect_Call) Return(err error) *MockBackend_SetWiFiAutoconnect_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_SetWiFiAutoconnect_Call) RunAndReturn(run func(string, bool) error) *MockBackend_SetWiFiAutoconnect_Call { +func (_c *MockBackend_SetWiFiAutoconnect_Call) RunAndReturn(run func(ssid string, autoconnect bool) error) *MockBackend_SetWiFiAutoconnect_Call { _c.Call.Return(run) return _c } -// SetWiFiEnabled provides a mock function with given fields: enabled -func (_m *MockBackend) SetWiFiEnabled(enabled bool) error { - ret := _m.Called(enabled) +// SetWiFiEnabled provides a mock function for the type MockBackend +func (_mock *MockBackend) SetWiFiEnabled(enabled bool) error { + ret := _mock.Called(enabled) if len(ret) == 0 { panic("no return value specified for SetWiFiEnabled") } var r0 error - if rf, ok := ret.Get(0).(func(bool) error); ok { - r0 = rf(enabled) + if returnFunc, ok := ret.Get(0).(func(bool) error); ok { + r0 = returnFunc(enabled) } else { r0 = ret.Error(0) } - return r0 } @@ -1766,42 +1881,47 @@ type MockBackend_SetWiFiEnabled_Call struct { // SetWiFiEnabled is a helper method to define mock.On call // - enabled bool -func (_e *MockBackend_Expecter) SetWiFiEnabled(enabled interface{}) *MockBackend_SetWiFiEnabled_Call { +func (_e *MockBackend_Expecter) SetWiFiEnabled(enabled any) *MockBackend_SetWiFiEnabled_Call { return &MockBackend_SetWiFiEnabled_Call{Call: _e.mock.On("SetWiFiEnabled", enabled)} } func (_c *MockBackend_SetWiFiEnabled_Call) Run(run func(enabled bool)) *MockBackend_SetWiFiEnabled_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) + var arg0 bool + if args[0] != nil { + arg0 = args[0].(bool) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_SetWiFiEnabled_Call) Return(_a0 error) *MockBackend_SetWiFiEnabled_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_SetWiFiEnabled_Call) Return(err error) *MockBackend_SetWiFiEnabled_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_SetWiFiEnabled_Call) RunAndReturn(run func(bool) error) *MockBackend_SetWiFiEnabled_Call { +func (_c *MockBackend_SetWiFiEnabled_Call) RunAndReturn(run func(enabled bool) error) *MockBackend_SetWiFiEnabled_Call { _c.Call.Return(run) return _c } -// StartMonitoring provides a mock function with given fields: onStateChange -func (_m *MockBackend) StartMonitoring(onStateChange func()) error { - ret := _m.Called(onStateChange) +// StartMonitoring provides a mock function for the type MockBackend +func (_mock *MockBackend) StartMonitoring(onStateChange func()) error { + ret := _mock.Called(onStateChange) if len(ret) == 0 { panic("no return value specified for StartMonitoring") } var r0 error - if rf, ok := ret.Get(0).(func(func()) error); ok { - r0 = rf(onStateChange) + if returnFunc, ok := ret.Get(0).(func(func()) error); ok { + r0 = returnFunc(onStateChange) } else { r0 = ret.Error(0) } - return r0 } @@ -1812,30 +1932,37 @@ type MockBackend_StartMonitoring_Call struct { // StartMonitoring is a helper method to define mock.On call // - onStateChange func() -func (_e *MockBackend_Expecter) StartMonitoring(onStateChange interface{}) *MockBackend_StartMonitoring_Call { +func (_e *MockBackend_Expecter) StartMonitoring(onStateChange any) *MockBackend_StartMonitoring_Call { return &MockBackend_StartMonitoring_Call{Call: _e.mock.On("StartMonitoring", onStateChange)} } func (_c *MockBackend_StartMonitoring_Call) Run(run func(onStateChange func())) *MockBackend_StartMonitoring_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(func())) + var arg0 func() + if args[0] != nil { + arg0 = args[0].(func()) + } + run( + arg0, + ) }) return _c } -func (_c *MockBackend_StartMonitoring_Call) Return(_a0 error) *MockBackend_StartMonitoring_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_StartMonitoring_Call) Return(err error) *MockBackend_StartMonitoring_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_StartMonitoring_Call) RunAndReturn(run func(func()) error) *MockBackend_StartMonitoring_Call { +func (_c *MockBackend_StartMonitoring_Call) RunAndReturn(run func(onStateChange func()) error) *MockBackend_StartMonitoring_Call { _c.Call.Return(run) return _c } -// StopMonitoring provides a mock function with no fields -func (_m *MockBackend) StopMonitoring() { - _m.Called() +// StopMonitoring provides a mock function for the type MockBackend +func (_mock *MockBackend) StopMonitoring() { + _mock.Called() + return } // MockBackend_StopMonitoring_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopMonitoring' @@ -1865,21 +1992,20 @@ func (_c *MockBackend_StopMonitoring_Call) RunAndReturn(run func()) *MockBackend return _c } -// SubmitCredentials provides a mock function with given fields: token, secrets, save -func (_m *MockBackend) SubmitCredentials(token string, secrets map[string]string, save bool) error { - ret := _m.Called(token, secrets, save) +// SubmitCredentials provides a mock function for the type MockBackend +func (_mock *MockBackend) SubmitCredentials(token string, secrets map[string]string, save bool) error { + ret := _mock.Called(token, secrets, save) if len(ret) == 0 { panic("no return value specified for SubmitCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(string, map[string]string, bool) error); ok { - r0 = rf(token, secrets, save) + if returnFunc, ok := ret.Get(0).(func(string, map[string]string, bool) error); ok { + r0 = returnFunc(token, secrets, save) } else { r0 = ret.Error(0) } - return r0 } @@ -1892,42 +2018,57 @@ type MockBackend_SubmitCredentials_Call struct { // - token string // - secrets map[string]string // - save bool -func (_e *MockBackend_Expecter) SubmitCredentials(token interface{}, secrets interface{}, save interface{}) *MockBackend_SubmitCredentials_Call { +func (_e *MockBackend_Expecter) SubmitCredentials(token any, secrets any, save any) *MockBackend_SubmitCredentials_Call { return &MockBackend_SubmitCredentials_Call{Call: _e.mock.On("SubmitCredentials", token, secrets, save)} } func (_c *MockBackend_SubmitCredentials_Call) Run(run func(token string, secrets map[string]string, save bool)) *MockBackend_SubmitCredentials_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(map[string]string), args[2].(bool)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 map[string]string + if args[1] != nil { + arg1 = args[1].(map[string]string) + } + var arg2 bool + if args[2] != nil { + arg2 = args[2].(bool) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } -func (_c *MockBackend_SubmitCredentials_Call) Return(_a0 error) *MockBackend_SubmitCredentials_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_SubmitCredentials_Call) Return(err error) *MockBackend_SubmitCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_SubmitCredentials_Call) RunAndReturn(run func(string, map[string]string, bool) error) *MockBackend_SubmitCredentials_Call { +func (_c *MockBackend_SubmitCredentials_Call) RunAndReturn(run func(token string, secrets map[string]string, save bool) error) *MockBackend_SubmitCredentials_Call { _c.Call.Return(run) return _c } -// UpdateVPNConfig provides a mock function with given fields: uuid, updates -func (_m *MockBackend) UpdateVPNConfig(uuid string, updates map[string]interface{}) error { - ret := _m.Called(uuid, updates) +// UpdateVPNConfig provides a mock function for the type MockBackend +func (_mock *MockBackend) UpdateVPNConfig(uuid string, updates map[string]any) error { + ret := _mock.Called(uuid, updates) if len(ret) == 0 { panic("no return value specified for UpdateVPNConfig") } var r0 error - if rf, ok := ret.Get(0).(func(string, map[string]interface{}) error); ok { - r0 = rf(uuid, updates) + if returnFunc, ok := ret.Get(0).(func(string, map[string]any) error); ok { + r0 = returnFunc(uuid, updates) } else { r0 = ret.Error(0) } - return r0 } @@ -1938,38 +2079,35 @@ type MockBackend_UpdateVPNConfig_Call struct { // UpdateVPNConfig is a helper method to define mock.On call // - uuid string -// - updates map[string]interface{} -func (_e *MockBackend_Expecter) UpdateVPNConfig(uuid interface{}, updates interface{}) *MockBackend_UpdateVPNConfig_Call { +// - updates map[string]any +func (_e *MockBackend_Expecter) UpdateVPNConfig(uuid any, updates any) *MockBackend_UpdateVPNConfig_Call { return &MockBackend_UpdateVPNConfig_Call{Call: _e.mock.On("UpdateVPNConfig", uuid, updates)} } -func (_c *MockBackend_UpdateVPNConfig_Call) Run(run func(uuid string, updates map[string]interface{})) *MockBackend_UpdateVPNConfig_Call { +func (_c *MockBackend_UpdateVPNConfig_Call) Run(run func(uuid string, updates map[string]any)) *MockBackend_UpdateVPNConfig_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(map[string]interface{})) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 map[string]any + if args[1] != nil { + arg1 = args[1].(map[string]any) + } + run( + arg0, + arg1, + ) }) return _c } -func (_c *MockBackend_UpdateVPNConfig_Call) Return(_a0 error) *MockBackend_UpdateVPNConfig_Call { - _c.Call.Return(_a0) +func (_c *MockBackend_UpdateVPNConfig_Call) Return(err error) *MockBackend_UpdateVPNConfig_Call { + _c.Call.Return(err) return _c } -func (_c *MockBackend_UpdateVPNConfig_Call) RunAndReturn(run func(string, map[string]interface{}) error) *MockBackend_UpdateVPNConfig_Call { +func (_c *MockBackend_UpdateVPNConfig_Call) RunAndReturn(run func(uuid string, updates map[string]any) error) *MockBackend_UpdateVPNConfig_Call { _c.Call.Return(run) return _c } - -// NewMockBackend creates a new instance of MockBackend. 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 NewMockBackend(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBackend { - mock := &MockBackend{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/utils/mock_AppChecker.go b/core/internal/mocks/utils/mock_AppChecker.go index be220c4c..dc1ad367 100644 --- a/core/internal/mocks/utils/mock_AppChecker.go +++ b/core/internal/mocks/utils/mock_AppChecker.go @@ -1,231 +1,12 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_utils -import mock "github.com/stretchr/testify/mock" - -// MockAppChecker is an autogenerated mock type for the AppChecker type -type MockAppChecker struct { - mock.Mock -} - -type MockAppChecker_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAppChecker) EXPECT() *MockAppChecker_Expecter { - return &MockAppChecker_Expecter{mock: &_m.Mock} -} - -// AnyCommandExists provides a mock function with given fields: cmds -func (_m *MockAppChecker) AnyCommandExists(cmds ...string) bool { - _va := make([]interface{}, len(cmds)) - for _i := range cmds { - _va[_i] = cmds[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AnyCommandExists") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(...string) bool); ok { - r0 = rf(cmds...) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAppChecker_AnyCommandExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnyCommandExists' -type MockAppChecker_AnyCommandExists_Call struct { - *mock.Call -} - -// AnyCommandExists is a helper method to define mock.On call -// - cmds ...string -func (_e *MockAppChecker_Expecter) AnyCommandExists(cmds ...interface{}) *MockAppChecker_AnyCommandExists_Call { - return &MockAppChecker_AnyCommandExists_Call{Call: _e.mock.On("AnyCommandExists", - append([]interface{}{}, cmds...)...)} -} - -func (_c *MockAppChecker_AnyCommandExists_Call) Run(run func(cmds ...string)) *MockAppChecker_AnyCommandExists_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(string) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockAppChecker_AnyCommandExists_Call) Return(_a0 bool) *MockAppChecker_AnyCommandExists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppChecker_AnyCommandExists_Call) RunAndReturn(run func(...string) bool) *MockAppChecker_AnyCommandExists_Call { - _c.Call.Return(run) - return _c -} - -// AnyFlatpakExists provides a mock function with given fields: flatpaks -func (_m *MockAppChecker) AnyFlatpakExists(flatpaks ...string) bool { - _va := make([]interface{}, len(flatpaks)) - for _i := range flatpaks { - _va[_i] = flatpaks[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AnyFlatpakExists") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(...string) bool); ok { - r0 = rf(flatpaks...) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAppChecker_AnyFlatpakExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnyFlatpakExists' -type MockAppChecker_AnyFlatpakExists_Call struct { - *mock.Call -} - -// AnyFlatpakExists is a helper method to define mock.On call -// - flatpaks ...string -func (_e *MockAppChecker_Expecter) AnyFlatpakExists(flatpaks ...interface{}) *MockAppChecker_AnyFlatpakExists_Call { - return &MockAppChecker_AnyFlatpakExists_Call{Call: _e.mock.On("AnyFlatpakExists", - append([]interface{}{}, flatpaks...)...)} -} - -func (_c *MockAppChecker_AnyFlatpakExists_Call) Run(run func(flatpaks ...string)) *MockAppChecker_AnyFlatpakExists_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(string) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockAppChecker_AnyFlatpakExists_Call) Return(_a0 bool) *MockAppChecker_AnyFlatpakExists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppChecker_AnyFlatpakExists_Call) RunAndReturn(run func(...string) bool) *MockAppChecker_AnyFlatpakExists_Call { - _c.Call.Return(run) - return _c -} - -// CommandExists provides a mock function with given fields: cmd -func (_m *MockAppChecker) CommandExists(cmd string) bool { - ret := _m.Called(cmd) - - if len(ret) == 0 { - panic("no return value specified for CommandExists") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(cmd) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAppChecker_CommandExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommandExists' -type MockAppChecker_CommandExists_Call struct { - *mock.Call -} - -// CommandExists is a helper method to define mock.On call -// - cmd string -func (_e *MockAppChecker_Expecter) CommandExists(cmd interface{}) *MockAppChecker_CommandExists_Call { - return &MockAppChecker_CommandExists_Call{Call: _e.mock.On("CommandExists", cmd)} -} - -func (_c *MockAppChecker_CommandExists_Call) Run(run func(cmd string)) *MockAppChecker_CommandExists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockAppChecker_CommandExists_Call) Return(_a0 bool) *MockAppChecker_CommandExists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppChecker_CommandExists_Call) RunAndReturn(run func(string) bool) *MockAppChecker_CommandExists_Call { - _c.Call.Return(run) - return _c -} - -// FlatpakExists provides a mock function with given fields: name -func (_m *MockAppChecker) FlatpakExists(name string) bool { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for FlatpakExists") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(name) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAppChecker_FlatpakExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlatpakExists' -type MockAppChecker_FlatpakExists_Call struct { - *mock.Call -} - -// FlatpakExists is a helper method to define mock.On call -// - name string -func (_e *MockAppChecker_Expecter) FlatpakExists(name interface{}) *MockAppChecker_FlatpakExists_Call { - return &MockAppChecker_FlatpakExists_Call{Call: _e.mock.On("FlatpakExists", name)} -} - -func (_c *MockAppChecker_FlatpakExists_Call) Run(run func(name string)) *MockAppChecker_FlatpakExists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockAppChecker_FlatpakExists_Call) Return(_a0 bool) *MockAppChecker_FlatpakExists_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppChecker_FlatpakExists_Call) RunAndReturn(run func(string) bool) *MockAppChecker_FlatpakExists_Call { - _c.Call.Return(run) - return _c -} +import ( + mock "github.com/stretchr/testify/mock" +) // NewMockAppChecker creates a new instance of MockAppChecker. 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. @@ -240,3 +21,244 @@ func NewMockAppChecker(t interface { return mock } + +// MockAppChecker is an autogenerated mock type for the AppChecker type +type MockAppChecker struct { + mock.Mock +} + +type MockAppChecker_Expecter struct { + mock *mock.Mock +} + +func (_m *MockAppChecker) EXPECT() *MockAppChecker_Expecter { + return &MockAppChecker_Expecter{mock: &_m.Mock} +} + +// AnyCommandExists provides a mock function for the type MockAppChecker +func (_mock *MockAppChecker) AnyCommandExists(cmds ...string) bool { + // string + _va := make([]any, len(cmds)) + for _i := range cmds { + _va[_i] = cmds[_i] + } + var _ca []any + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for AnyCommandExists") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(...string) bool); ok { + r0 = returnFunc(cmds...) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockAppChecker_AnyCommandExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnyCommandExists' +type MockAppChecker_AnyCommandExists_Call struct { + *mock.Call +} + +// AnyCommandExists is a helper method to define mock.On call +// - cmds ...string +func (_e *MockAppChecker_Expecter) AnyCommandExists(cmds ...any) *MockAppChecker_AnyCommandExists_Call { + return &MockAppChecker_AnyCommandExists_Call{Call: _e.mock.On("AnyCommandExists", + append([]any{}, cmds...)...)} +} + +func (_c *MockAppChecker_AnyCommandExists_Call) Run(run func(cmds ...string)) *MockAppChecker_AnyCommandExists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 []string + variadicArgs := make([]string, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + arg0 = variadicArgs + run( + arg0..., + ) + }) + return _c +} + +func (_c *MockAppChecker_AnyCommandExists_Call) Return(b bool) *MockAppChecker_AnyCommandExists_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockAppChecker_AnyCommandExists_Call) RunAndReturn(run func(cmds ...string) bool) *MockAppChecker_AnyCommandExists_Call { + _c.Call.Return(run) + return _c +} + +// AnyFlatpakExists provides a mock function for the type MockAppChecker +func (_mock *MockAppChecker) AnyFlatpakExists(flatpaks ...string) bool { + // string + _va := make([]any, len(flatpaks)) + for _i := range flatpaks { + _va[_i] = flatpaks[_i] + } + var _ca []any + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for AnyFlatpakExists") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(...string) bool); ok { + r0 = returnFunc(flatpaks...) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockAppChecker_AnyFlatpakExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnyFlatpakExists' +type MockAppChecker_AnyFlatpakExists_Call struct { + *mock.Call +} + +// AnyFlatpakExists is a helper method to define mock.On call +// - flatpaks ...string +func (_e *MockAppChecker_Expecter) AnyFlatpakExists(flatpaks ...any) *MockAppChecker_AnyFlatpakExists_Call { + return &MockAppChecker_AnyFlatpakExists_Call{Call: _e.mock.On("AnyFlatpakExists", + append([]any{}, flatpaks...)...)} +} + +func (_c *MockAppChecker_AnyFlatpakExists_Call) Run(run func(flatpaks ...string)) *MockAppChecker_AnyFlatpakExists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 []string + variadicArgs := make([]string, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + arg0 = variadicArgs + run( + arg0..., + ) + }) + return _c +} + +func (_c *MockAppChecker_AnyFlatpakExists_Call) Return(b bool) *MockAppChecker_AnyFlatpakExists_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockAppChecker_AnyFlatpakExists_Call) RunAndReturn(run func(flatpaks ...string) bool) *MockAppChecker_AnyFlatpakExists_Call { + _c.Call.Return(run) + return _c +} + +// CommandExists provides a mock function for the type MockAppChecker +func (_mock *MockAppChecker) CommandExists(cmd string) bool { + ret := _mock.Called(cmd) + + if len(ret) == 0 { + panic("no return value specified for CommandExists") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(cmd) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockAppChecker_CommandExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommandExists' +type MockAppChecker_CommandExists_Call struct { + *mock.Call +} + +// CommandExists is a helper method to define mock.On call +// - cmd string +func (_e *MockAppChecker_Expecter) CommandExists(cmd any) *MockAppChecker_CommandExists_Call { + return &MockAppChecker_CommandExists_Call{Call: _e.mock.On("CommandExists", cmd)} +} + +func (_c *MockAppChecker_CommandExists_Call) Run(run func(cmd string)) *MockAppChecker_CommandExists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockAppChecker_CommandExists_Call) Return(b bool) *MockAppChecker_CommandExists_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockAppChecker_CommandExists_Call) RunAndReturn(run func(cmd string) bool) *MockAppChecker_CommandExists_Call { + _c.Call.Return(run) + return _c +} + +// FlatpakExists provides a mock function for the type MockAppChecker +func (_mock *MockAppChecker) FlatpakExists(name string) bool { + ret := _mock.Called(name) + + if len(ret) == 0 { + panic("no return value specified for FlatpakExists") + } + + var r0 bool + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(name) + } else { + r0 = ret.Get(0).(bool) + } + return r0 +} + +// MockAppChecker_FlatpakExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlatpakExists' +type MockAppChecker_FlatpakExists_Call struct { + *mock.Call +} + +// FlatpakExists is a helper method to define mock.On call +// - name string +func (_e *MockAppChecker_Expecter) FlatpakExists(name any) *MockAppChecker_FlatpakExists_Call { + return &MockAppChecker_FlatpakExists_Call{Call: _e.mock.On("FlatpakExists", name)} +} + +func (_c *MockAppChecker_FlatpakExists_Call) Run(run func(name string)) *MockAppChecker_FlatpakExists_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockAppChecker_FlatpakExists_Call) Return(b bool) *MockAppChecker_FlatpakExists_Call { + _c.Call.Return(b) + return _c +} + +func (_c *MockAppChecker_FlatpakExists_Call) RunAndReturn(run func(name string) bool) *MockAppChecker_FlatpakExists_Call { + _c.Call.Return(run) + return _c +} diff --git a/core/internal/mocks/version/mock_VersionFetcher.go b/core/internal/mocks/version/mock_VersionFetcher.go index a6fa27c9..601b4f89 100644 --- a/core/internal/mocks/version/mock_VersionFetcher.go +++ b/core/internal/mocks/version/mock_VersionFetcher.go @@ -1,133 +1,12 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_version -import mock "github.com/stretchr/testify/mock" - -// MockVersionFetcher is an autogenerated mock type for the VersionFetcher type -type MockVersionFetcher struct { - mock.Mock -} - -type MockVersionFetcher_Expecter struct { - mock *mock.Mock -} - -func (_m *MockVersionFetcher) EXPECT() *MockVersionFetcher_Expecter { - return &MockVersionFetcher_Expecter{mock: &_m.Mock} -} - -// GetCurrentVersion provides a mock function with given fields: dmsPath -func (_m *MockVersionFetcher) GetCurrentVersion(dmsPath string) (string, error) { - ret := _m.Called(dmsPath) - - if len(ret) == 0 { - panic("no return value specified for GetCurrentVersion") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(dmsPath) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(dmsPath) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(dmsPath) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVersionFetcher_GetCurrentVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentVersion' -type MockVersionFetcher_GetCurrentVersion_Call struct { - *mock.Call -} - -// GetCurrentVersion is a helper method to define mock.On call -// - dmsPath string -func (_e *MockVersionFetcher_Expecter) GetCurrentVersion(dmsPath interface{}) *MockVersionFetcher_GetCurrentVersion_Call { - return &MockVersionFetcher_GetCurrentVersion_Call{Call: _e.mock.On("GetCurrentVersion", dmsPath)} -} - -func (_c *MockVersionFetcher_GetCurrentVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetCurrentVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockVersionFetcher_GetCurrentVersion_Call) Return(_a0 string, _a1 error) *MockVersionFetcher_GetCurrentVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVersionFetcher_GetCurrentVersion_Call) RunAndReturn(run func(string) (string, error)) *MockVersionFetcher_GetCurrentVersion_Call { - _c.Call.Return(run) - return _c -} - -// GetLatestVersion provides a mock function with given fields: dmsPath -func (_m *MockVersionFetcher) GetLatestVersion(dmsPath string) (string, error) { - ret := _m.Called(dmsPath) - - if len(ret) == 0 { - panic("no return value specified for GetLatestVersion") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(dmsPath) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(dmsPath) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(dmsPath) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVersionFetcher_GetLatestVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersion' -type MockVersionFetcher_GetLatestVersion_Call struct { - *mock.Call -} - -// GetLatestVersion is a helper method to define mock.On call -// - dmsPath string -func (_e *MockVersionFetcher_Expecter) GetLatestVersion(dmsPath interface{}) *MockVersionFetcher_GetLatestVersion_Call { - return &MockVersionFetcher_GetLatestVersion_Call{Call: _e.mock.On("GetLatestVersion", dmsPath)} -} - -func (_c *MockVersionFetcher_GetLatestVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetLatestVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockVersionFetcher_GetLatestVersion_Call) Return(_a0 string, _a1 error) *MockVersionFetcher_GetLatestVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVersionFetcher_GetLatestVersion_Call) RunAndReturn(run func(string) (string, error)) *MockVersionFetcher_GetLatestVersion_Call { - _c.Call.Return(run) - return _c -} +import ( + mock "github.com/stretchr/testify/mock" +) // NewMockVersionFetcher creates a new instance of MockVersionFetcher. 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. @@ -142,3 +21,136 @@ func NewMockVersionFetcher(t interface { return mock } + +// MockVersionFetcher is an autogenerated mock type for the VersionFetcher type +type MockVersionFetcher struct { + mock.Mock +} + +type MockVersionFetcher_Expecter struct { + mock *mock.Mock +} + +func (_m *MockVersionFetcher) EXPECT() *MockVersionFetcher_Expecter { + return &MockVersionFetcher_Expecter{mock: &_m.Mock} +} + +// GetCurrentVersion provides a mock function for the type MockVersionFetcher +func (_mock *MockVersionFetcher) GetCurrentVersion(dmsPath string) (string, error) { + ret := _mock.Called(dmsPath) + + if len(ret) == 0 { + panic("no return value specified for GetCurrentVersion") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(dmsPath) + } + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(dmsPath) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(dmsPath) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockVersionFetcher_GetCurrentVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentVersion' +type MockVersionFetcher_GetCurrentVersion_Call struct { + *mock.Call +} + +// GetCurrentVersion is a helper method to define mock.On call +// - dmsPath string +func (_e *MockVersionFetcher_Expecter) GetCurrentVersion(dmsPath any) *MockVersionFetcher_GetCurrentVersion_Call { + return &MockVersionFetcher_GetCurrentVersion_Call{Call: _e.mock.On("GetCurrentVersion", dmsPath)} +} + +func (_c *MockVersionFetcher_GetCurrentVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetCurrentVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockVersionFetcher_GetCurrentVersion_Call) Return(s string, err error) *MockVersionFetcher_GetCurrentVersion_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockVersionFetcher_GetCurrentVersion_Call) RunAndReturn(run func(dmsPath string) (string, error)) *MockVersionFetcher_GetCurrentVersion_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestVersion provides a mock function for the type MockVersionFetcher +func (_mock *MockVersionFetcher) GetLatestVersion(dmsPath string) (string, error) { + ret := _mock.Called(dmsPath) + + if len(ret) == 0 { + panic("no return value specified for GetLatestVersion") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(dmsPath) + } + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(dmsPath) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(dmsPath) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockVersionFetcher_GetLatestVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersion' +type MockVersionFetcher_GetLatestVersion_Call struct { + *mock.Call +} + +// GetLatestVersion is a helper method to define mock.On call +// - dmsPath string +func (_e *MockVersionFetcher_Expecter) GetLatestVersion(dmsPath any) *MockVersionFetcher_GetLatestVersion_Call { + return &MockVersionFetcher_GetLatestVersion_Call{Call: _e.mock.On("GetLatestVersion", dmsPath)} +} + +func (_c *MockVersionFetcher_GetLatestVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetLatestVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockVersionFetcher_GetLatestVersion_Call) Return(s string, err error) *MockVersionFetcher_GetLatestVersion_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockVersionFetcher_GetLatestVersion_Call) RunAndReturn(run func(dmsPath string) (string, error)) *MockVersionFetcher_GetLatestVersion_Call { + _c.Call.Return(run) + return _c +} diff --git a/core/internal/mocks/wlclient/mock_WaylandDisplay.go b/core/internal/mocks/wlclient/mock_WaylandDisplay.go index 45d944bf..6558ad79 100644 --- a/core/internal/mocks/wlclient/mock_WaylandDisplay.go +++ b/core/internal/mocks/wlclient/mock_WaylandDisplay.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_wlclient import ( - client "github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client" + "github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client" mock "github.com/stretchr/testify/mock" ) +// NewMockWaylandDisplay creates a new instance of MockWaylandDisplay. 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 NewMockWaylandDisplay(t interface { + mock.TestingT + Cleanup(func()) +}) *MockWaylandDisplay { + mock := &MockWaylandDisplay{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockWaylandDisplay is an autogenerated mock type for the WaylandDisplay type type MockWaylandDisplay struct { mock.Mock @@ -20,23 +36,22 @@ func (_m *MockWaylandDisplay) EXPECT() *MockWaylandDisplay_Expecter { return &MockWaylandDisplay_Expecter{mock: &_m.Mock} } -// Context provides a mock function with no fields -func (_m *MockWaylandDisplay) Context() *client.Context { - ret := _m.Called() +// Context provides a mock function for the type MockWaylandDisplay +func (_mock *MockWaylandDisplay) Context() *client.Context { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Context") } var r0 *client.Context - if rf, ok := ret.Get(0).(func() *client.Context); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *client.Context); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*client.Context) } } - return r0 } @@ -57,8 +72,8 @@ func (_c *MockWaylandDisplay_Context_Call) Run(run func()) *MockWaylandDisplay_C return _c } -func (_c *MockWaylandDisplay_Context_Call) Return(_a0 *client.Context) *MockWaylandDisplay_Context_Call { - _c.Call.Return(_a0) +func (_c *MockWaylandDisplay_Context_Call) Return(context *client.Context) *MockWaylandDisplay_Context_Call { + _c.Call.Return(context) return _c } @@ -67,21 +82,20 @@ func (_c *MockWaylandDisplay_Context_Call) RunAndReturn(run func() *client.Conte return _c } -// Destroy provides a mock function with no fields -func (_m *MockWaylandDisplay) Destroy() error { - ret := _m.Called() +// Destroy provides a mock function for the type MockWaylandDisplay +func (_mock *MockWaylandDisplay) Destroy() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Destroy") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -102,8 +116,8 @@ func (_c *MockWaylandDisplay_Destroy_Call) Run(run func()) *MockWaylandDisplay_D return _c } -func (_c *MockWaylandDisplay_Destroy_Call) Return(_a0 error) *MockWaylandDisplay_Destroy_Call { - _c.Call.Return(_a0) +func (_c *MockWaylandDisplay_Destroy_Call) Return(err error) *MockWaylandDisplay_Destroy_Call { + _c.Call.Return(err) return _c } @@ -112,9 +126,9 @@ func (_c *MockWaylandDisplay_Destroy_Call) RunAndReturn(run func() error) *MockW return _c } -// GetRegistry provides a mock function with no fields -func (_m *MockWaylandDisplay) GetRegistry() (*client.Registry, error) { - ret := _m.Called() +// GetRegistry provides a mock function for the type MockWaylandDisplay +func (_mock *MockWaylandDisplay) GetRegistry() (*client.Registry, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetRegistry") @@ -122,23 +136,21 @@ func (_m *MockWaylandDisplay) GetRegistry() (*client.Registry, error) { var r0 *client.Registry var r1 error - if rf, ok := ret.Get(0).(func() (*client.Registry, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*client.Registry, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *client.Registry); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *client.Registry); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*client.Registry) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -159,8 +171,8 @@ func (_c *MockWaylandDisplay_GetRegistry_Call) Run(run func()) *MockWaylandDispl return _c } -func (_c *MockWaylandDisplay_GetRegistry_Call) Return(_a0 *client.Registry, _a1 error) *MockWaylandDisplay_GetRegistry_Call { - _c.Call.Return(_a0, _a1) +func (_c *MockWaylandDisplay_GetRegistry_Call) Return(registry *client.Registry, err error) *MockWaylandDisplay_GetRegistry_Call { + _c.Call.Return(registry, err) return _c } @@ -169,21 +181,20 @@ func (_c *MockWaylandDisplay_GetRegistry_Call) RunAndReturn(run func() (*client. return _c } -// Roundtrip provides a mock function with no fields -func (_m *MockWaylandDisplay) Roundtrip() error { - ret := _m.Called() +// Roundtrip provides a mock function for the type MockWaylandDisplay +func (_mock *MockWaylandDisplay) Roundtrip() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Roundtrip") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -204,8 +215,8 @@ func (_c *MockWaylandDisplay_Roundtrip_Call) Run(run func()) *MockWaylandDisplay return _c } -func (_c *MockWaylandDisplay_Roundtrip_Call) Return(_a0 error) *MockWaylandDisplay_Roundtrip_Call { - _c.Call.Return(_a0) +func (_c *MockWaylandDisplay_Roundtrip_Call) Return(err error) *MockWaylandDisplay_Roundtrip_Call { + _c.Call.Return(err) return _c } @@ -213,17 +224,3 @@ func (_c *MockWaylandDisplay_Roundtrip_Call) RunAndReturn(run func() error) *Moc _c.Call.Return(run) return _c } - -// NewMockWaylandDisplay creates a new instance of MockWaylandDisplay. 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 NewMockWaylandDisplay(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWaylandDisplay { - mock := &MockWaylandDisplay{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/internal/mocks/wlcontext/mock_WaylandContext.go b/core/internal/mocks/wlcontext/mock_WaylandContext.go index f5b0c357..8f1fc66d 100644 --- a/core/internal/mocks/wlcontext/mock_WaylandContext.go +++ b/core/internal/mocks/wlcontext/mock_WaylandContext.go @@ -1,12 +1,28 @@ -// Code generated by mockery v2.53.5. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks_wlcontext import ( - client "github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client" + "github.com/AvengeMedia/DankMaterialShell/core/pkg/go-wayland/wayland/client" mock "github.com/stretchr/testify/mock" ) +// NewMockWaylandContext creates a new instance of MockWaylandContext. 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 NewMockWaylandContext(t interface { + mock.TestingT + Cleanup(func()) +}) *MockWaylandContext { + mock := &MockWaylandContext{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // MockWaylandContext is an autogenerated mock type for the WaylandContext type type MockWaylandContext struct { mock.Mock @@ -20,9 +36,10 @@ func (_m *MockWaylandContext) EXPECT() *MockWaylandContext_Expecter { return &MockWaylandContext_Expecter{mock: &_m.Mock} } -// Close provides a mock function with no fields -func (_m *MockWaylandContext) Close() { - _m.Called() +// Close provides a mock function for the type MockWaylandContext +func (_mock *MockWaylandContext) Close() { + _mock.Called() + return } // MockWaylandContext_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' @@ -52,23 +69,22 @@ func (_c *MockWaylandContext_Close_Call) RunAndReturn(run func()) *MockWaylandCo return _c } -// Display provides a mock function with no fields -func (_m *MockWaylandContext) Display() *client.Display { - ret := _m.Called() +// Display provides a mock function for the type MockWaylandContext +func (_mock *MockWaylandContext) Display() *client.Display { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Display") } var r0 *client.Display - if rf, ok := ret.Get(0).(func() *client.Display); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *client.Display); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*client.Display) } } - return r0 } @@ -89,8 +105,8 @@ func (_c *MockWaylandContext_Display_Call) Run(run func()) *MockWaylandContext_D return _c } -func (_c *MockWaylandContext_Display_Call) Return(_a0 *client.Display) *MockWaylandContext_Display_Call { - _c.Call.Return(_a0) +func (_c *MockWaylandContext_Display_Call) Return(display *client.Display) *MockWaylandContext_Display_Call { + _c.Call.Return(display) return _c } @@ -99,23 +115,22 @@ func (_c *MockWaylandContext_Display_Call) RunAndReturn(run func() *client.Displ return _c } -// FatalError provides a mock function with no fields -func (_m *MockWaylandContext) FatalError() <-chan error { - ret := _m.Called() +// FatalError provides a mock function for the type MockWaylandContext +func (_mock *MockWaylandContext) FatalError() <-chan error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for FatalError") } var r0 <-chan error - if rf, ok := ret.Get(0).(func() <-chan error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() <-chan error); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan error) } } - return r0 } @@ -136,8 +151,8 @@ func (_c *MockWaylandContext_FatalError_Call) Run(run func()) *MockWaylandContex return _c } -func (_c *MockWaylandContext_FatalError_Call) Return(_a0 <-chan error) *MockWaylandContext_FatalError_Call { - _c.Call.Return(_a0) +func (_c *MockWaylandContext_FatalError_Call) Return(errCh <-chan error) *MockWaylandContext_FatalError_Call { + _c.Call.Return(errCh) return _c } @@ -146,9 +161,10 @@ func (_c *MockWaylandContext_FatalError_Call) RunAndReturn(run func() <-chan err return _c } -// Post provides a mock function with given fields: fn -func (_m *MockWaylandContext) Post(fn func()) { - _m.Called(fn) +// Post provides a mock function for the type MockWaylandContext +func (_mock *MockWaylandContext) Post(fn func()) { + _mock.Called(fn) + return } // MockWaylandContext_Post_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Post' @@ -158,13 +174,19 @@ type MockWaylandContext_Post_Call struct { // Post is a helper method to define mock.On call // - fn func() -func (_e *MockWaylandContext_Expecter) Post(fn interface{}) *MockWaylandContext_Post_Call { +func (_e *MockWaylandContext_Expecter) Post(fn any) *MockWaylandContext_Post_Call { return &MockWaylandContext_Post_Call{Call: _e.mock.On("Post", fn)} } func (_c *MockWaylandContext_Post_Call) Run(run func(fn func())) *MockWaylandContext_Post_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(func())) + var arg0 func() + if args[0] != nil { + arg0 = args[0].(func()) + } + run( + arg0, + ) }) return _c } @@ -174,14 +196,15 @@ func (_c *MockWaylandContext_Post_Call) Return() *MockWaylandContext_Post_Call { return _c } -func (_c *MockWaylandContext_Post_Call) RunAndReturn(run func(func())) *MockWaylandContext_Post_Call { +func (_c *MockWaylandContext_Post_Call) RunAndReturn(run func(fn func())) *MockWaylandContext_Post_Call { _c.Run(run) return _c } -// Start provides a mock function with no fields -func (_m *MockWaylandContext) Start() { - _m.Called() +// Start provides a mock function for the type MockWaylandContext +func (_mock *MockWaylandContext) Start() { + _mock.Called() + return } // MockWaylandContext_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' @@ -210,17 +233,3 @@ func (_c *MockWaylandContext_Start_Call) RunAndReturn(run func()) *MockWaylandCo _c.Run(run) return _c } - -// NewMockWaylandContext creates a new instance of MockWaylandContext. 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 NewMockWaylandContext(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWaylandContext { - mock := &MockWaylandContext{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/flake.nix b/flake.nix index 8b673697..f66a4900 100644 --- a/flake.nix +++ b/flake.nix @@ -222,7 +222,7 @@ with pkgs; [ (goForPkgs pkgs) - go-mockery_2 + go-mockery gopls delve go-tools