mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-23 11:35:25 -04:00
core: migrate to mockery v3
This commit is contained in:
+65
-62
@@ -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: {}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+221
-243
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user