1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-23 19:45:21 -04:00

core: migrate to mockery v3

This commit is contained in:
bbedward
2026-06-22 23:27:12 -04:00
parent ad32af6eeb
commit c5e08a6f2c
23 changed files with 5520 additions and 4805 deletions
+45 -35
View File
@@ -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
}