initial commit
This commit is contained in:
649
internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go
Normal file
649
internal/mocks/github.com/godbus/dbus/v5/mock_BusObject.go
Normal file
@@ -0,0 +1,649 @@
|
||||
// Code generated by mockery v2.53.5. DO NOT EDIT.
|
||||
|
||||
package dbus
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
dbus "github.com/godbus/dbus/v5"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// MockBusObject is an autogenerated mock type for the BusObject type
|
||||
type MockBusObject struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
type MockBusObject_Expecter struct {
|
||||
mock *mock.Mock
|
||||
}
|
||||
|
||||
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))
|
||||
for _i := range options {
|
||||
_va[_i] = options[_i]
|
||||
}
|
||||
var _ca []interface{}
|
||||
_ca = append(_ca, iface, member)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_AddMatchSignal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMatchSignal'
|
||||
type MockBusObject_AddMatchSignal_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AddMatchSignal is a helper method to define mock.On call
|
||||
// - iface string
|
||||
// - member string
|
||||
// - options ...dbus.MatchOption
|
||||
func (_e *MockBusObject_Expecter) AddMatchSignal(iface interface{}, member interface{}, options ...interface{}) *MockBusObject_AddMatchSignal_Call {
|
||||
return &MockBusObject_AddMatchSignal_Call{Call: _e.mock.On("AddMatchSignal",
|
||||
append([]interface{}{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) {
|
||||
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...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_AddMatchSignal_Call) Return(_a0 *dbus.Call) *MockBusObject_AddMatchSignal_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_AddMatchSignal_Call) RunAndReturn(run func(string, string, ...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{}
|
||||
_ca = append(_ca, method, flags)
|
||||
_ca = append(_ca, args...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call'
|
||||
type MockBusObject_Call_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// 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 {
|
||||
return &MockBusObject_Call_Call{Call: _e.mock.On("Call",
|
||||
append([]interface{}{method, flags}, args...)...)}
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Call_Call) Run(run func(method string, flags dbus.Flags, args ...interface{})) *MockBusObject_Call_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]interface{}, len(args)-2)
|
||||
for i, a := range args[2:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(interface{})
|
||||
}
|
||||
}
|
||||
run(args[0].(string), args[1].(dbus.Flags), variadicArgs...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Call_Call) Return(_a0 *dbus.Call) *MockBusObject_Call_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Call_Call) RunAndReturn(run func(string, dbus.Flags, ...interface{}) *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{}
|
||||
_ca = append(_ca, ctx, method, flags)
|
||||
_ca = append(_ca, args...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_CallWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallWithContext'
|
||||
type MockBusObject_CallWithContext_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// CallWithContext is a helper method to define mock.On call
|
||||
// - 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 {
|
||||
return &MockBusObject_CallWithContext_Call{Call: _e.mock.On("CallWithContext",
|
||||
append([]interface{}{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 {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]interface{}, len(args)-3)
|
||||
for i, a := range args[3:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(interface{})
|
||||
}
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(dbus.Flags), variadicArgs...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_CallWithContext_Call) Return(_a0 *dbus.Call) *MockBusObject_CallWithContext_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_CallWithContext_Call) RunAndReturn(run func(context.Context, string, dbus.Flags, ...interface{}) *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()
|
||||
|
||||
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()
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_Destination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destination'
|
||||
type MockBusObject_Destination_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Destination is a helper method to define mock.On call
|
||||
func (_e *MockBusObject_Expecter) Destination() *MockBusObject_Destination_Call {
|
||||
return &MockBusObject_Destination_Call{Call: _e.mock.On("Destination")}
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Destination_Call) Run(run func()) *MockBusObject_Destination_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Destination_Call) Return(_a0 string) *MockBusObject_Destination_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Destination_Call) RunAndReturn(run func() string) *MockBusObject_Destination_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetProperty provides a mock function with given fields: p
|
||||
func (_m *MockBusObject) GetProperty(p string) (dbus.Variant, error) {
|
||||
ret := _m.Called(p)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetProperty")
|
||||
}
|
||||
|
||||
var r0 dbus.Variant
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (dbus.Variant, error)); ok {
|
||||
return rf(p)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) dbus.Variant); ok {
|
||||
r0 = rf(p)
|
||||
} else {
|
||||
r0 = ret.Get(0).(dbus.Variant)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(p)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockBusObject_GetProperty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProperty'
|
||||
type MockBusObject_GetProperty_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetProperty is a helper method to define mock.On call
|
||||
// - p string
|
||||
func (_e *MockBusObject_Expecter) GetProperty(p interface{}) *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))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_GetProperty_Call) Return(_a0 dbus.Variant, _a1 error) *MockBusObject_GetProperty_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_GetProperty_Call) RunAndReturn(run func(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{}
|
||||
_ca = append(_ca, method, flags, ch)
|
||||
_ca = append(_ca, args...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_Go_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Go'
|
||||
type MockBusObject_Go_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Go is a helper method to define mock.On call
|
||||
// - 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 {
|
||||
return &MockBusObject_Go_Call{Call: _e.mock.On("Go",
|
||||
append([]interface{}{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 {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]interface{}, len(args)-3)
|
||||
for i, a := range args[3:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(interface{})
|
||||
}
|
||||
}
|
||||
run(args[0].(string), args[1].(dbus.Flags), args[2].(chan *dbus.Call), variadicArgs...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Go_Call) Return(_a0 *dbus.Call) *MockBusObject_Go_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Go_Call) RunAndReturn(run func(string, dbus.Flags, chan *dbus.Call, ...interface{}) *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{}
|
||||
_ca = append(_ca, ctx, method, flags, ch)
|
||||
_ca = append(_ca, args...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_GoWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GoWithContext'
|
||||
type MockBusObject_GoWithContext_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GoWithContext is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - 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 {
|
||||
return &MockBusObject_GoWithContext_Call{Call: _e.mock.On("GoWithContext",
|
||||
append([]interface{}{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 {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]interface{}, len(args)-4)
|
||||
for i, a := range args[4:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(interface{})
|
||||
}
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(dbus.Flags), args[3].(chan *dbus.Call), variadicArgs...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_GoWithContext_Call) Return(_a0 *dbus.Call) *MockBusObject_GoWithContext_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_GoWithContext_Call) RunAndReturn(run func(context.Context, string, dbus.Flags, chan *dbus.Call, ...interface{}) *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()
|
||||
|
||||
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()
|
||||
} else {
|
||||
r0 = ret.Get(0).(dbus.ObjectPath)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_Path_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Path'
|
||||
type MockBusObject_Path_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Path is a helper method to define mock.On call
|
||||
func (_e *MockBusObject_Expecter) Path() *MockBusObject_Path_Call {
|
||||
return &MockBusObject_Path_Call{Call: _e.mock.On("Path")}
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Path_Call) Run(run func()) *MockBusObject_Path_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Path_Call) Return(_a0 dbus.ObjectPath) *MockBusObject_Path_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_Path_Call) RunAndReturn(run func() dbus.ObjectPath) *MockBusObject_Path_Call {
|
||||
_c.Call.Return(run)
|
||||
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))
|
||||
for _i := range options {
|
||||
_va[_i] = options[_i]
|
||||
}
|
||||
var _ca []interface{}
|
||||
_ca = append(_ca, iface, member)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.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...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*dbus.Call)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_RemoveMatchSignal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveMatchSignal'
|
||||
type MockBusObject_RemoveMatchSignal_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// RemoveMatchSignal is a helper method to define mock.On call
|
||||
// - iface string
|
||||
// - member string
|
||||
// - options ...dbus.MatchOption
|
||||
func (_e *MockBusObject_Expecter) RemoveMatchSignal(iface interface{}, member interface{}, options ...interface{}) *MockBusObject_RemoveMatchSignal_Call {
|
||||
return &MockBusObject_RemoveMatchSignal_Call{Call: _e.mock.On("RemoveMatchSignal",
|
||||
append([]interface{}{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) {
|
||||
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...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_RemoveMatchSignal_Call) Return(_a0 *dbus.Call) *MockBusObject_RemoveMatchSignal_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_RemoveMatchSignal_Call) RunAndReturn(run func(string, string, ...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)
|
||||
|
||||
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)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_SetProperty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetProperty'
|
||||
type MockBusObject_SetProperty_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// 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 {
|
||||
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 {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(interface{}))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_SetProperty_Call) Return(_a0 error) *MockBusObject_SetProperty_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_SetProperty_Call) RunAndReturn(run func(string, interface{}) 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)
|
||||
|
||||
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)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// MockBusObject_StoreProperty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreProperty'
|
||||
type MockBusObject_StoreProperty_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// 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 {
|
||||
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 {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(interface{}))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_StoreProperty_Call) Return(_a0 error) *MockBusObject_StoreProperty_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockBusObject_StoreProperty_Call) RunAndReturn(run func(string, interface{}) 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
|
||||
}
|
||||
Reference in New Issue
Block a user