// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package ui import ( "github.com/bnema/nefergui/internal/layout" "github.com/bnema/nefergui/internal/presentation/session" mock "github.com/stretchr/testify/mock" ) // newMocktarget creates a new instance of mocktarget. 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 newMocktarget(t interface { mock.TestingT Cleanup(func()) }) *mocktarget { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mocktarget{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mocktarget is an autogenerated mock type for the target type type mocktarget struct { mock.Mock } type mocktarget_Expecter struct { mock *mock.Mock } func (_m *mocktarget) EXPECT() *mocktarget_Expecter { return &mocktarget_Expecter{mock: &_m.Mock} } // Close provides a mock function for the type mocktarget func (_mock *mocktarget) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // mocktarget_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type mocktarget_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *mocktarget_Expecter) Close() *mocktarget_Close_Call { return &mocktarget_Close_Call{Call: _e.mock.On("Close")} } func (_c *mocktarget_Close_Call) Run(run func()) *mocktarget_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mocktarget_Close_Call) Return(err error) *mocktarget_Close_Call { _c.Call.Return(err) return _c } func (_c *mocktarget_Close_Call) RunAndReturn(run func() error) *mocktarget_Close_Call { _c.Call.Return(run) return _c } // Draw provides a mock function for the type mocktarget func (_mock *mocktarget) Draw(display []layout.Command, scale float64, out *session.Output) (bool, error) { ret := _mock.Called(display, scale, out) if len(ret) == 0 { panic("no return value specified for Draw") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func([]layout.Command, float64, *session.Output) (bool, error)); ok { return returnFunc(display, scale, out) } if returnFunc, ok := ret.Get(0).(func([]layout.Command, float64, *session.Output) bool); ok { r0 = returnFunc(display, scale, out) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func([]layout.Command, float64, *session.Output) error); ok { r1 = returnFunc(display, scale, out) } else { r1 = ret.Error(1) } return r0, r1 } // mocktarget_Draw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Draw' type mocktarget_Draw_Call struct { *mock.Call } // Draw is a helper method to define mock.On call // - display []layout.Command // - scale float64 // - out *session.Output func (_e *mocktarget_Expecter) Draw(display any, scale any, out any) *mocktarget_Draw_Call { return &mocktarget_Draw_Call{Call: _e.mock.On("Draw", display, scale, out)} } func (_c *mocktarget_Draw_Call) Run(run func(display []layout.Command, scale float64, out *session.Output)) *mocktarget_Draw_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 []layout.Command if args[0] != nil { arg0 = args[0].([]layout.Command) } var arg1 float64 if args[1] != nil { arg1 = args[1].(float64) } var arg2 *session.Output if args[2] != nil { arg2 = args[2].(*session.Output) } run( arg0, arg1, arg2, ) }) return _c } func (_c *mocktarget_Draw_Call) Return(b bool, err error) *mocktarget_Draw_Call { _c.Call.Return(b, err) return _c } func (_c *mocktarget_Draw_Call) RunAndReturn(run func(display []layout.Command, scale float64, out *session.Output) (bool, error)) *mocktarget_Draw_Call { _c.Call.Return(run) return _c } // Released provides a mock function for the type mocktarget func (_mock *mocktarget) Released(buffer uint64) error { ret := _mock.Called(buffer) if len(ret) == 0 { panic("no return value specified for Released") } var r0 error if returnFunc, ok := ret.Get(0).(func(uint64) error); ok { r0 = returnFunc(buffer) } else { r0 = ret.Error(0) } return r0 } // mocktarget_Released_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Released' type mocktarget_Released_Call struct { *mock.Call } // Released is a helper method to define mock.On call // - buffer uint64 func (_e *mocktarget_Expecter) Released(buffer any) *mocktarget_Released_Call { return &mocktarget_Released_Call{Call: _e.mock.On("Released", buffer)} } func (_c *mocktarget_Released_Call) Run(run func(buffer uint64)) *mocktarget_Released_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 uint64 if args[0] != nil { arg0 = args[0].(uint64) } run( arg0, ) }) return _c } func (_c *mocktarget_Released_Call) Return(err error) *mocktarget_Released_Call { _c.Call.Return(err) return _c } func (_c *mocktarget_Released_Call) RunAndReturn(run func(buffer uint64) error) *mocktarget_Released_Call { _c.Call.Return(run) return _c } // Resize provides a mock function for the type mocktarget func (_mock *mocktarget) Resize(width int32, height int32) { _mock.Called(width, height) return } // mocktarget_Resize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resize' type mocktarget_Resize_Call struct { *mock.Call } // Resize is a helper method to define mock.On call // - width int32 // - height int32 func (_e *mocktarget_Expecter) Resize(width any, height any) *mocktarget_Resize_Call { return &mocktarget_Resize_Call{Call: _e.mock.On("Resize", width, height)} } func (_c *mocktarget_Resize_Call) Run(run func(width int32, height int32)) *mocktarget_Resize_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 int32 if args[0] != nil { arg0 = args[0].(int32) } var arg1 int32 if args[1] != nil { arg1 = args[1].(int32) } run( arg0, arg1, ) }) return _c } func (_c *mocktarget_Resize_Call) Return() *mocktarget_Resize_Call { _c.Call.Return() return _c } func (_c *mocktarget_Resize_Call) RunAndReturn(run func(width int32, height int32)) *mocktarget_Resize_Call { _c.Run(run) return _c } // Waiting provides a mock function for the type mocktarget func (_mock *mocktarget) Waiting() bool { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Waiting") } var r0 bool if returnFunc, ok := ret.Get(0).(func() bool); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } return r0 } // mocktarget_Waiting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Waiting' type mocktarget_Waiting_Call struct { *mock.Call } // Waiting is a helper method to define mock.On call func (_e *mocktarget_Expecter) Waiting() *mocktarget_Waiting_Call { return &mocktarget_Waiting_Call{Call: _e.mock.On("Waiting")} } func (_c *mocktarget_Waiting_Call) Run(run func()) *mocktarget_Waiting_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mocktarget_Waiting_Call) Return(b bool) *mocktarget_Waiting_Call { _c.Call.Return(b) return _c } func (_c *mocktarget_Waiting_Call) RunAndReturn(run func() bool) *mocktarget_Waiting_Call { _c.Call.Return(run) return _c }