initial commit
This commit is contained in:
@@ -0,0 +1,467 @@
|
||||
// Code generated by mockery v2.53.5. DO NOT EDIT.
|
||||
|
||||
package gonetworkmanager
|
||||
|
||||
import (
|
||||
gonetworkmanager "github.com/Wifx/gonetworkmanager/v2"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// MockSettings is an autogenerated mock type for the Settings type
|
||||
type MockSettings struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
type MockSettings_Expecter struct {
|
||||
mock *mock.Mock
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddConnection")
|
||||
}
|
||||
|
||||
var r0 gonetworkmanager.Connection
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok {
|
||||
return rf(settings)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok {
|
||||
r0 = rf(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)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_AddConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddConnection'
|
||||
type MockSettings_AddConnection_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AddConnection is a helper method to define mock.On call
|
||||
// - settings gonetworkmanager.ConnectionSettings
|
||||
func (_e *MockSettings_Expecter) AddConnection(settings interface{}) *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))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_AddConnection_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_AddConnection_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_AddConnection_Call) RunAndReturn(run func(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)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddConnectionUnsaved")
|
||||
}
|
||||
|
||||
var r0 gonetworkmanager.Connection
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) (gonetworkmanager.Connection, error)); ok {
|
||||
return rf(settings)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) gonetworkmanager.Connection); ok {
|
||||
r0 = rf(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)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_AddConnectionUnsaved_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddConnectionUnsaved'
|
||||
type MockSettings_AddConnectionUnsaved_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AddConnectionUnsaved is a helper method to define mock.On call
|
||||
// - settings gonetworkmanager.ConnectionSettings
|
||||
func (_e *MockSettings_Expecter) AddConnectionUnsaved(settings interface{}) *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))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_AddConnectionUnsaved_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_AddConnectionUnsaved_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_AddConnectionUnsaved_Call) RunAndReturn(run func(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)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetConnectionByUUID")
|
||||
}
|
||||
|
||||
var r0 gonetworkmanager.Connection
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (gonetworkmanager.Connection, error)); ok {
|
||||
return rf(uuid)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) gonetworkmanager.Connection); ok {
|
||||
r0 = rf(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)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_GetConnectionByUUID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionByUUID'
|
||||
type MockSettings_GetConnectionByUUID_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetConnectionByUUID is a helper method to define mock.On call
|
||||
// - uuid string
|
||||
func (_e *MockSettings_Expecter) GetConnectionByUUID(uuid interface{}) *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))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetConnectionByUUID_Call) Return(_a0 gonetworkmanager.Connection, _a1 error) *MockSettings_GetConnectionByUUID_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetConnectionByUUID_Call) RunAndReturn(run func(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()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPropertyCanModify")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_GetPropertyCanModify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPropertyCanModify'
|
||||
type MockSettings_GetPropertyCanModify_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetPropertyCanModify is a helper method to define mock.On call
|
||||
func (_e *MockSettings_Expecter) GetPropertyCanModify() *MockSettings_GetPropertyCanModify_Call {
|
||||
return &MockSettings_GetPropertyCanModify_Call{Call: _e.mock.On("GetPropertyCanModify")}
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyCanModify_Call) Run(run func()) *MockSettings_GetPropertyCanModify_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyCanModify_Call) Return(_a0 bool, _a1 error) *MockSettings_GetPropertyCanModify_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyCanModify_Call) RunAndReturn(run func() (bool, error)) *MockSettings_GetPropertyCanModify_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetPropertyHostname provides a mock function with no fields
|
||||
func (_m *MockSettings) GetPropertyHostname() (string, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPropertyHostname")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_GetPropertyHostname_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPropertyHostname'
|
||||
type MockSettings_GetPropertyHostname_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetPropertyHostname is a helper method to define mock.On call
|
||||
func (_e *MockSettings_Expecter) GetPropertyHostname() *MockSettings_GetPropertyHostname_Call {
|
||||
return &MockSettings_GetPropertyHostname_Call{Call: _e.mock.On("GetPropertyHostname")}
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyHostname_Call) Run(run func()) *MockSettings_GetPropertyHostname_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyHostname_Call) Return(_a0 string, _a1 error) *MockSettings_GetPropertyHostname_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_GetPropertyHostname_Call) RunAndReturn(run func() (string, error)) *MockSettings_GetPropertyHostname_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ListConnections provides a mock function with no fields
|
||||
func (_m *MockSettings) ListConnections() ([]gonetworkmanager.Connection, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListConnections")
|
||||
}
|
||||
|
||||
var r0 []gonetworkmanager.Connection
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]gonetworkmanager.Connection, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []gonetworkmanager.Connection); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]gonetworkmanager.Connection)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockSettings_ListConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConnections'
|
||||
type MockSettings_ListConnections_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ListConnections is a helper method to define mock.On call
|
||||
func (_e *MockSettings_Expecter) ListConnections() *MockSettings_ListConnections_Call {
|
||||
return &MockSettings_ListConnections_Call{Call: _e.mock.On("ListConnections")}
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ListConnections_Call) Run(run func()) *MockSettings_ListConnections_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ListConnections_Call) Return(_a0 []gonetworkmanager.Connection, _a1 error) *MockSettings_ListConnections_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ListConnections_Call) RunAndReturn(run func() ([]gonetworkmanager.Connection, error)) *MockSettings_ListConnections_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ReloadConnections provides a mock function with no fields
|
||||
func (_m *MockSettings) ReloadConnections() error {
|
||||
ret := _m.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()
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockSettings_ReloadConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReloadConnections'
|
||||
type MockSettings_ReloadConnections_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ReloadConnections is a helper method to define mock.On call
|
||||
func (_e *MockSettings_Expecter) ReloadConnections() *MockSettings_ReloadConnections_Call {
|
||||
return &MockSettings_ReloadConnections_Call{Call: _e.mock.On("ReloadConnections")}
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ReloadConnections_Call) Run(run func()) *MockSettings_ReloadConnections_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ReloadConnections_Call) Return(_a0 error) *MockSettings_ReloadConnections_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_ReloadConnections_Call) RunAndReturn(run func() error) *MockSettings_ReloadConnections_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SaveHostname provides a mock function with given fields: hostname
|
||||
func (_m *MockSettings) SaveHostname(hostname string) error {
|
||||
ret := _m.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)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockSettings_SaveHostname_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveHostname'
|
||||
type MockSettings_SaveHostname_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// SaveHostname is a helper method to define mock.On call
|
||||
// - hostname string
|
||||
func (_e *MockSettings_Expecter) SaveHostname(hostname interface{}) *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))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_SaveHostname_Call) Return(_a0 error) *MockSettings_SaveHostname_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockSettings_SaveHostname_Call) RunAndReturn(run func(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
|
||||
}
|
||||
Reference in New Issue
Block a user