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
+62 -49
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_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
}