1
0
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:
bbedward
2026-06-22 23:27:12 -04:00
parent ad32af6eeb
commit c5e08a6f2c
23 changed files with 5520 additions and 4805 deletions
@@ -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
}